-
Notifications
You must be signed in to change notification settings - Fork 13.3k
linker: Use --as-needed
by default when linker supports it
#83587
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
Conversation
r? @lcnr (rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
This makes sense to me. r=me after tests pass. (Side note: I find it curious |
@bors r=nagisa |
📌 Commit 6615ee8 has been approved by |
☀️ Test successful - checks-actions |
rustc_target: Avoid unwraps when adding linker flags These `unwrap`s assume that some linker flags were already added by `*_base::opts()` methods, but that's doesn't necessarily remain the case when we are reducing the number of flags hardcoded in targets, as rust-lang#83587 shows. r? `@nagisa`
Do it in a centralized way in
link.rs
instead of individual target specs.Majority of relevant target specs were already passing it.