-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Look up runtime libraries in SDK #25740
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
In swiftlang#23175, we started looking in the SDK for swiftmodules, but we want to look for the dylibs there too. Fixes <rdar://problem/52059706>.
@swift-ci please smoke test |
Refactor to merge some very similar code in different branches. This ended up slightly changing the order of arguments in Linux linker commands.
Gives us consistent results between macOS and Linux.
@swift-ci please test |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
||
SmallVector<std::string, 4> RuntimeLibPaths; | ||
getRuntimeLibraryPaths(RuntimeLibPaths, context.Args, | ||
context.OI.SDKPath, /*Shared=*/!wantsStaticStdlib); |
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.
Apple platforms don't support the static stdlib anymore, so you can probably just drop this.
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.
Doing this properly (i.e. with good diagnostics) will require a little more work than I want to do right now. I've filed https://bugs.swift.org/browse/SR-11015 to track the idea.
Turns out the order of the linker flags matters on Linux; see swiftlang#9958. I don’t know if the change I previously made would break something, but it’s not worth risking it.
@swift-ci please smoke test |
@swift-ci please test Windows platform |
1 similar comment
@swift-ci please test Windows platform |
@swift-ci please smoke test |
@swift-ci please test Windows platform |
Cherry-picks swiftlang#25740: > In swiftlang#23175, we started looking in the SDK for swiftmodules, but we want to look for the dylibs there too. Fixes <rdar://problem/52059706>.
[5.1] Look up runtime libraries in SDK (#25740)
In #23175, we started looking in the SDK for swiftmodules, but we want to look for the libraries there too while linking. Fixes rdar://problem/52059706.
(This PR is not quite fully baked, but I want to kick off Linux tests while I read over the code and check a few details about how this should behave.)This PR ought to be ready to go, but I could use confirmation that it's actually implementing the desired behavior.