Skip to content
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

[5.7][Driver] Work around lld 13+ issue with --gc-sections for ELF by adding -z nostart-stop-gc #60653

Merged
merged 1 commit into from
Aug 23, 2022

Conversation

finagolfin
Copy link
Member

@finagolfin finagolfin commented Aug 19, 2022

Cherrypick of #60544

Explanation: lld 13 changed how --gc-sections works last year, which was then flipped on by default, and causes all Swift code on ELF platforms not to link with lld 13 and 14 anymore if stripping is enabled.

Scope: Only affects lld for these ELF platforms

SR Issue: #60406

Risk: low, since it only affects ELF platforms for this one linker

Testing: I just built the last August 2 source snapshot of the 5.7 toolchain for Android AArch64, where lld 14 is the default linker, with this patch and it works well.

Reviewer: @compnerd

…ng -z nostart-stop-gc (swiftlang#60544)

Fixes swiftlang#60406 

Ran the linux x86_64 compiler validation suite on this pull with `-use-ld=lld -Xlinker --gc-sections`, then without stripping as in the linked issue, and only saw the 20 unrelated failures just like @drodriguez had.
@finagolfin finagolfin requested a review from a team as a code owner August 19, 2022 18:36
@keith
Copy link
Member

keith commented Aug 19, 2022

@swift-ci test

@compnerd
Copy link
Member

@swift-ci please test Linux platform

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.7
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants