-
Notifications
You must be signed in to change notification settings - Fork 10.5k
stdlib: prevent static builds on Darwin #26210
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
Conversation
@swift-ci please test |
Build failed |
@swift-ci please test |
Build failed |
Build failed |
Funny, I just filed a bug related to this: https://bugs.swift.org/browse/SR-11157 I think it would be better to not error out, though—wouldn't that make it impossible to share a preset that builds static standard libraries for non-Darwin platforms with Darwin? |
Yes, it does make that impossible, but, really, that is already pretty badly broken. The current model doesn't really work (CMake just is not designed that way) - e.g. |
Static builds of the standard library and the SDK overlay are unsupported post ABI stability. Disallow building of the standard library and SDK overlay statically for Darwin platforms.
@swift-ci please test |
Build failed |
I think @shahmishal needs to be part of this conversation, because if we can't use the same presets on Darwin and other platforms, that's going to impact the way CI is configured. |
Looking at build-presets.ini, the following apparently-Darwin presets still use this flag:
We should probably remove the flag from these. |
Beyond the update of the presets, the question is, should we even permit building the standard library/SDK overlay for Darwin in static mode? |
We think not permitting it is fine. There is no supported way to use the static libraries on Darwin. Mishal says that we (should) always use separate presets for Linux, so preset sharing isn't a concern. |
@swift-ci please test macOS platform |
Build failed |
@swift-ci please test macOS platform |
Sounds like all the concerns have been addressed, I'm going to go ahead and merge this. As @shahmishal said, if we run into cases where the preset is using static builds, we will update the preset and sharing is not a concern. |
Static builds of the standard library and the SDK overlay are
unsupported post ABI stability. Disallow building of the standard
library and SDK overlay statically for Darwin platforms.
Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.
Resolves SR-NNNN.