-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[CMake] Begin moving Standard Library options in a separate file #40610
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
[CMake] Begin moving Standard Library options in a separate file #40610
Conversation
This allows the file to be easily included where needed (e.g. `StandaloneOverlay.cmake`) and reduce the likelihood of miscompilation due to missing sensible defaults. As a start, focus on a handful of parameters that got added/modified in recent PRs. Addresses rdar://85978195
@swift-ci please smoke test |
preset=stdlib_S_standalone_minimal_macho_x86_64,build,test |
@swift-ci please build toolchain |
Build failed |
Very cool! Why not move all the options from stdlib/CMakeLists.txt, though? |
Linux Toolchain (Ubuntu 16.04) Install command |
I wanted to start small to reduce the likelihood of unanticipated fallout when validating this approach (especially for the options that are in both |
The failure for https://ci.swift.org/job/swift-PR-stdlib-with-toolchain-osx-preset/89/ |
preset=stdlib_S_standalone_darwin_x86_64,build |
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 that this is fine for now. I think that longer term, it would be more interesting to bring the standalone overlay builds as a normal build of just the standard library portions of the tree.
macOS Toolchain Install command |
@compnerd agreed -- the intention is for this to be a short/medium term solution while we work on migrating some internal configurations that still rely on |
Verified that
|
That sounds amazing! Sorry, I didn't have that context. |
This allows the file to be easily included where needed (e.g. `StandaloneOverlay.cmake`) and reduce the likelihood of miscompilation due to missing sensible defaults. Focus on parameters only in stdlib/CMakeLists.txt whose defaults are not computed. This matches swiftlang#40610 + swiftlang#40640 Addresses rdar://86740965
…0669) This allows the file to be easily included where needed (e.g. `StandaloneOverlay.cmake`) and reduce the likelihood of miscompilation due to missing sensible defaults. Focus on parameters only in stdlib/CMakeLists.txt whose defaults are not computed. This matches #40610 + #40640 Addresses rdar://86740965
…41942) In #40610 some options were moved into `StdlibOptions.cmake`, but that file is only included from `stdlib/CMakeLists.txt` and `cmake/modules/StandaloneOverlay.cmake`. However, if one does not build neither the dynamic nor the static standard library, but enables building the "toolchain extras" with `SWIFT_BUILD_STDLIB_EXTRA_TOOLCHAIN_CONTENT` `stdlib/CMakeLists.txt` will not be included, but `stdlib/toolchain/CMakeLists.txt` will, which uses a value from `StandardOverlay.cmake` that will not be provided the correct default value and will skip building most of what `SWIFT_BUILD_STDLIB_EXTRA_TOOLCHAIN_CONTENT` used to do.
This allows the file to be easily included where needed (e.g.
StandaloneOverlay.cmake
) and reduce the likelihood of miscompilationdue to missing sensible defaults.
As a start, focus on a handful of parameters that got added/modified in
recent PRs.
Addresses rdar://85978195