-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[build] Pass target argument to the linker if needed #31794
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
[build] Pass target argument to the linker if needed #31794
Conversation
Following swiftlang#31125 and swiftlang#31612, `-target` is not added automatically to linker flags when that's needed (e.g. when building for Apple SDKs) -- mimic the logic used to add it for compiler flags. Addresses rdar://63138761
@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.
@drexin there’s the thread on the variable/predicate that I’d like to see resolved first. |
@swift-ci please test |
@compnerd Exactly, that's why I was saying I'd like to wait for you to respond :) |
Build failed |
@swift-ci please test Windows |
Build failed |
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.
Thanks! LGTM
As part of this refactor some code touched as part of #31794 to better fit into the work done in #32120 -- in detail * `_add_host_variant_c_compile_link_flags` is now invoked by both add_swift_host_library and add_swift_host_library * `_add_host_variant_c_compile_link_flags` now sets the target in linker arguments when building against Apple SDKs Addresses rdar://64911978
Following #31125 and #31612,
-target
is not added automatically tolinker flags when that's needed (e.g. when building for Apple SDKs) --
mimic the logic used to add it for compiler flags.
Addresses rdar://63138761