-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Use lld by default on x86_64-unknown-linux-gnu
stable
#140525
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
Open
lqd
wants to merge
16
commits into
rust-lang:master
Choose a base branch
from
lqd:stabilize-lld
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+353
−174
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
c90aca3
use LLD by default on x64 regardless of channel
lqd fc55497
add post-dist test for checking that we use LLD
lqd c02f85e
stabilize `-Zlinker-features` as `-Clinker-features`
lqd 12ad4fa
check that `-Clinker-features=[-+]lld` can only be used on x64 linux …
lqd 3bc1e07
stabilize `-Clink-self-contained=[+-]linker`
lqd 9f0fb67
add test for unstable values of `-Clink-self-contained`
lqd 57187c8
update documentation
lqd 98d2074
update `check_unstable_variants`'s handling of `-C linker-features=[-…
lqd b16c1ae
update bootstrap mcp510 handling
lqd b242bd2
simplify test annotations
lqd 1d21627
check that `-Clink-self-contained=[-+]linker` can only be used on x64…
lqd 9155f8f
expand documentation with x64 linux implementation notes
lqd e659bd1
update unstable linker-features test
lqd 50170a3
remove `-znostart-stop-gc` workaround
lqd ef99848
only stabilize `-Clinker-features=-lld` on x64 linux
lqd 1117bc1
only stabilize `-Clink-self-contained=-linker` on x64 linux
lqd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -115,7 +115,7 @@ impl Cargo { | |
// No need to configure the target linker for these command types. | ||
Kind::Clean | Kind::Check | Kind::Suggest | Kind::Format | Kind::Setup => {} | ||
_ => { | ||
cargo.configure_linker(builder); | ||
cargo.configure_linker(builder, mode); | ||
} | ||
} | ||
|
||
|
@@ -206,7 +206,7 @@ impl Cargo { | |
|
||
// FIXME(onur-ozkan): Add coverage to make sure modifications to this function | ||
// doesn't cause cache invalidations (e.g., #130108). | ||
fn configure_linker(&mut self, builder: &Builder<'_>) -> &mut Cargo { | ||
fn configure_linker(&mut self, builder: &Builder<'_>, mode: Mode) -> &mut Cargo { | ||
let target = self.target; | ||
let compiler = self.compiler; | ||
|
||
|
@@ -261,7 +261,15 @@ impl Cargo { | |
} | ||
} | ||
|
||
for arg in linker_args(builder, compiler.host, LldThreads::Yes) { | ||
// When determining flags for the host (build scripts/proc macros), | ||
// we use the snapshot compiler when building `Mode::Std` tools, and | ||
// the current compiler when building anything else. | ||
// We need to determine the current stage here to pass proper linker args (e.g. -C vs -Z) | ||
// to the compiler used to compile build scripts. | ||
// This should stay synchronized with the [cargo] function. | ||
let host_stage = if mode == Mode::Std { 0 } else { compiler.stage }; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think that this should be just |
||
|
||
for arg in linker_args(builder, compiler.host, LldThreads::Yes, host_stage) { | ||
self.hostflags.arg(&arg); | ||
} | ||
|
||
|
@@ -271,10 +279,10 @@ impl Cargo { | |
} | ||
// We want to set -Clinker using Cargo, therefore we only call `linker_flags` and not | ||
// `linker_args` here. | ||
for flag in linker_flags(builder, target, LldThreads::Yes) { | ||
for flag in linker_flags(builder, target, LldThreads::Yes, compiler.stage) { | ||
self.rustflags.arg(&flag); | ||
} | ||
for arg in linker_args(builder, target, LldThreads::Yes) { | ||
for arg in linker_args(builder, target, LldThreads::Yes, compiler.stage) { | ||
self.rustdocflags.arg(&arg); | ||
} | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Future self ref: This needs an update from #119899 when rebased.