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

Swap TargetOptions::linker_is_gnu default from false to true and update targets as appropriate. #85531

Merged
merged 2 commits into from
May 22, 2021

Conversation

luqmana
Copy link
Member

@luqmana luqmana commented May 21, 2021

#85274 gated the --gc-sections flag on targets that specified linker_is_gnu to stop us from passing it to incompatible linkers. But that had the unintended effect of the flag no longer being passed on targets for which it is valid and hence caused a regression in binary size. Given that most ld-style linkers are GNU compatible, this change flips our default for linker_is_gnu from false to true. That also means updating the targets that relied on the previous default:

  • Apple
  • Illumos
  • L4Re (not sure about this one)
  • MSVC
  • NvtPtx
  • Solaris

Fixes #85519

@rust-highfive
Copy link
Collaborator

r? @estebank

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 21, 2021
@luqmana
Copy link
Member Author

luqmana commented May 21, 2021

r? @petrochenkov

@petrochenkov
Copy link
Contributor

Could you also remove all the linker_is_gnu: trues from the specs, since they are now inherited from the default?

@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented May 21, 2021

📌 Commit 3221a5e has been approved by petrochenkov

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 21, 2021
@jamesmunns
Copy link
Member

Thanks @luqmana!

@bors
Copy link
Contributor

bors commented May 22, 2021

⌛ Testing commit 3221a5e with merge 21e1cd9...

@bors
Copy link
Contributor

bors commented May 22, 2021

☀️ Test successful - checks-actions
Approved by: petrochenkov
Pushing 21e1cd9 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 22, 2021
@bors bors merged commit 21e1cd9 into rust-lang:master May 22, 2021
@rustbot rustbot added this to the 1.54.0 milestone May 22, 2021
@luqmana luqmana deleted the flip-gc branch May 23, 2021 22:20
@petrochenkov
Copy link
Contributor

One more regression from this - #85948.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

28x binary size regression in recent nightly
7 participants