-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Serialization: avoid pushing static libraries into autolink #63814
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
base: main
Are you sure you want to change the base?
Conversation
Remove the static libraries from autolinking. This should be safe to do with SPM builds which does not respect the static linking and instead treats all targets as object libraries for static linking. With CMake this should also not be a problem as it already requires dependencies be spelt out and then correctly forms the linker invocation. This prevents us from double linking a library (both into a potential intermediate shared library and any consumers of any public interfaces).
This exposes an interesting issue that I was afraid of. There are symbols that may be part of a public interface that cannot be fully internalised. |
@swift-ci please build toolchain Windows platform |
Please test with following PRs: @swift-ci please build toolchain Windows platform |
Please test with following PRs: @swift-ci please build toolchain Windows platform |
Please test with following PRs: @swift-ci please test |
@swift-ci please test Linux platform |
@swift-ci please test |
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.
This seems reasonable to me.
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.
Seems reasonable
@swift-ci please test Windows platform |
@swift-ci please test Linux platform |
1 similar comment
@swift-ci please test Linux platform |
@swift-ci please test |
@swift-ci please test Linux platform |
Remove the static libraries from autolinking. This should be safe to do with SPM builds which does not respect the static linking and instead treats all targets as object libraries for static linking. With CMake this should also not be a problem as it already requires dependencies be spelt out and then correctly forms the linker invocation. This prevents us from double linking a library (both into a potential intermediate shared library and any consumers of any public interfaces).