Skip to content

Commit 078fa1f

Browse files
committed
use LLD by default on x64 regardless of channel
1 parent 1bb3352 commit 078fa1f

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
@@ -1357,9 +1357,7 @@ pub fn rustc_cargo_env(
13571357
}
13581358

13591359
// Enable rustc's env var for `rust-lld` when requested.
1360-
if builder.config.lld_enabled
1361-
&& (builder.config.channel == "dev" || builder.config.channel == "nightly")
1362-
{
1360+
if builder.config.lld_enabled {
13631361
cargo.env("CFG_USE_SELF_CONTAINED_LINKER", "1");
13641362
}
13651363

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,6 @@ impl Config {
612612
// build our internal lld and use it as the default linker, by setting the `rust.lld` config
613613
// to true by default:
614614
// - on the `x86_64-unknown-linux-gnu` target
615-
// - on the `dev` and `nightly` channels
616615
// - when building our in-tree llvm (i.e. the target has not set an `llvm-config`), so that
617616
// we're also able to build the corresponding lld
618617
// - or when using an external llvm that's downloaded from CI, which also contains our prebuilt
@@ -621,9 +620,7 @@ impl Config {
621620
// thus, disabled
622621
// - similarly, lld will not be built nor used by default when explicitly asked not to, e.g.
623622
// when the config sets `rust.lld = false`
624-
if self.host_target.triple == "x86_64-unknown-linux-gnu"
625-
&& self.hosts == [self.host_target]
626-
&& (self.channel == "dev" || self.channel == "nightly")
623+
if self.host_target.triple == "x86_64-unknown-linux-gnu" && self.hosts == [self.host_target]
627624
{
628625
let no_llvm_config = self
629626
.target_config

0 commit comments

Comments
 (0)