-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[build] avoid use generator expression to add linker parameter #29636
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] avoid use generator expression to add linker parameter #29636
Conversation
Generator expressions seem not to allow the `LINKER:` prefix to be expanded correctly when used in `target_link_options`. To solve this, undo the change from swiftlang#29451 and instead use an `if` statement to add the flag when needed. Addresses rdar://problem/59117166
@swift-ci please test |
@swift-ci please test Windows platform |
Build failed |
The failure on Swift Test OS X Platform looks related to machine configuration
|
@swift-ci please test macOS |
@swift-ci please smoke-test |
@swift-ci please smoke test |
It is supported, but I think that it could be a limitation of 3.15. Could you please update the comment or better yet, add it as:
|
@swift-ci please test |
@swift-ci please smoke test |
@swift-ci please test Windows platform |
Build failed |
Committed e438ce7 with the proposal -- we will introduce a bit of code duplication, but (a) both code paths are next to each other and (b) we will not forget about the opportunity to make this code more streamlined |
Build failed |
@swift-ci please test Windows platform |
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.
Would be nice to squash these before merging
After noticing that also in CMake 3.16 the LINKER: prefix is not expanded correctly when used in `target_link_options`, prefer to set the linker parameters in a more verbose way and leave a comment behind on when this behavior was observed in case we want to change the implementation later. Follow up to swiftlang#29636. Addresses rdar://problem/59732421
After noticing that also in CMake 3.16 the LINKER: prefix is not expanded correctly when used in `target_link_options`, prefer to set the linker parameters in a more verbose way and leave a comment behind on when this behavior was observed in case we want to change the implementation later. Follow up to #29636. Addresses rdar://problem/59732421
Generator expressions seem not to allow the
LINKER:
prefix to beexpanded correctly when used in
target_link_options
.To solve this, undo the change from #29451 and instead
use an
if
statement to add the flag when needed.Addresses rdar://problem/59117166