Skip to content

Commit a4ea949

Browse files
committed
use LLD by default on x64 regardless of channel
1 parent 2783fc4 commit a4ea949

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

src/bootstrap/src/core/build_steps/compile.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1369,9 +1369,7 @@ pub fn rustc_cargo_env(
13691369
}
13701370

13711371
// Enable rustc's env var for `rust-lld` when requested.
1372-
if builder.config.lld_enabled
1373-
&& (builder.config.channel == "dev" || builder.config.channel == "nightly")
1374-
{
1372+
if builder.config.lld_enabled {
13751373
cargo.env("CFG_USE_SELF_CONTAINED_LINKER", "1");
13761374
}
13771375

src/bootstrap/src/core/config/toml/rust.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,6 @@ impl Config {
619619
// build our internal lld and use it as the default linker, by setting the `rust.lld` config
620620
// to true by default:
621621
// - on the `x86_64-unknown-linux-gnu` target
622-
// - on the `dev` and `nightly` channels
623622
// - when building our in-tree llvm (i.e. the target has not set an `llvm-config`), so that
624623
// we're also able to build the corresponding lld
625624
// - or when using an external llvm that's downloaded from CI, which also contains our prebuilt
@@ -628,9 +627,7 @@ impl Config {
628627
// thus, disabled
629628
// - similarly, lld will not be built nor used by default when explicitly asked not to, e.g.
630629
// when the config sets `rust.lld = false`
631-
if self.host_target.triple == "x86_64-unknown-linux-gnu"
632-
&& self.hosts == [self.host_target]
633-
&& (self.channel == "dev" || self.channel == "nightly")
630+
if self.host_target.triple == "x86_64-unknown-linux-gnu" && self.hosts == [self.host_target]
634631
{
635632
let no_llvm_config = self
636633
.target_config

0 commit comments

Comments
 (0)