-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get Swift-Foundation building for Musl/Static SDK #838
Get Swift-Foundation building for Musl/Static SDK #838
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd really rather that we just merge #714 rather than do the workaround that you are doing for the macros.
We can do that, but since they aren't used in the build, we don't need to build them at all. |
*yet - eventually the macro will be needed to build Foundation itself, so this isn't an option that we can expect to be long-lived if we did add it |
The install/deployment story for macros is still very hazy and will likely need to change, but this is for 6.0. Unless you're planning on making them required to build Swift-Foundation in the 6.0 release? In which case, yes, we should take the bits of #714 for ensuring that the macros are compiled for the machine doing the build rather than the machine that we're building for. At the same time, in that case, we should build the macro independently as a separate project and expose it through some |
Ah I missed that this is for 6.0 - normally for 6.0 work we merge to |
swiftlang/swift-corelibs-foundation#5060 |
Sources/CMakeLists.txt
Outdated
if(NOT CMAKE_SYSTEM_NAME STREQUAL Windows) | ||
add_subdirectory(FoundationMacros) | ||
# Macros are only useful for development, but not at runtime. | ||
option(SwiftFoundation_BUILD_MACROS "Include SwiftFoundation Macro Targets" ON) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this flag set to false by the build script on Windows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, is now: swiftlang/swift#75814
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these changes will likely "conflict" with the changes the @compnerd has landed on main
(and the ongoing work that I have a PR for). It'd be helpful to see the main
PR for this work as well while reviewing this to see what our plan is for beyond just this release, where Macros are now built separately
This change will need to be cherry-picked to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment about handling macros on the main
branch where we've redesigned how they're built, but otherwise I don't have any additional comments on this
Sources/CMakeLists.txt
Outdated
if(NOT CMAKE_SYSTEM_NAME STREQUAL Windows) | ||
add_subdirectory(FoundationMacros) | ||
# Macros are only useful for development, but not at runtime. | ||
option(SwiftFoundation_BUILD_MACROS "Include SwiftFoundation Macro Targets" ON) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these changes will likely "conflict" with the changes the @compnerd has landed on main
(and the ongoing work that I have a PR for). It'd be helpful to see the main
PR for this work as well while reviewing this to see what our plan is for beyond just this release, where Macros are now built separately
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6.0 change looks fine to me
Adding the missing musl imports to get FoundationEssentials building for the Swift static SDKs again. Also providing an option to disable building the macros. The macros aren't necessary for building the library and will not be run as part of the static SDK. No need to bloat the SDK or build times further. For Swift 6, the macros should be provided by the toolchain since the toolchain and SDK are current revlocked due to swiftmodules.
Adding the missing Musl imports to get FoundationInternationalization building for the static SDK.
118fa4d
to
062c415
Compare
@swift-ci please test |
This adds the missing imports to get Swift-Foundation building against Musl so we can get the static SDK going again.