-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Remove --gc-sections for all targets for now #5707
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
Remove --gc-sections for all targets for now #5707
Conversation
Similar to the comment here about wasm-ld, lld recently switched a default that broke this for all elf targets. This is a low risk fix since we weren't passing this flag before either. People who really need this behavior can still pass something like `-Xlinker --gc-sections -Xlinker -z -Xlinker nostart-stop-gc`
Ideally we can fix this instead with swiftlang/swift#60357, but if that PR isn't enough, this might be necessary in the short term. |
Can we just apply this as a short-term fix for the 5.7 branch, or do all 5.7 fixes have to go into trunk first? Your stdlib pull will fix trunk and there's no urgency with trunk, only 5.7. |
here's a 5.7 PR #5708 |
@keith should we get this merged into main first, then 5.7? |
@swift-ci smoke test |
yea there was a question of if we could only do 5.7 and try to solve the core issue without reverting on main, but whatever the process is is fine with me. we can always revert this if we can solve the core issue too |
I rather keep them symmetrical so we dont have a later regression, then we can revert / reintroduce when ready? |
yep sounds fine! |
@swift-ci please test windows platform |
I doubt the windows failure here is related, it seems to be timing out |
@compnerd okay to merge even with the windows failure? |
I think that a retest should help - the offending change was reverted. |
@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.
This seems safe for Windows; if the Windows CI still flakes, lets go ahead and merge this anyways.
It should work with lld now that the lld flag '-z nostart-stop-gc' was added with swiftlang/swift#60544 and swiftlang/swift-driver#1153.
It should work with lld now that the lld flag '-z nostart-stop-gc' was added with swiftlang/swift#60544 and swiftlang/swift-driver#1153.
Similar to the comment here about wasm-ld, lld recently switched a
default that broke this for all elf targets. This is a low risk fix
since we weren't passing this flag before either. People who really need
this behavior can still pass something like
-Xlinker --gc-sections -Xlinker -z -Xlinker nostart-stop-gc
Fixes #5698