Skip to content

Commit 8b63752

Browse files
lqdKobzol
authored andcommitted
Use LLD by default on x64 regardless of channel
1 parent 7d65abf commit 8b63752

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

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

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

13281328
// Enable rustc's env var for `rust-lld` when requested.
1329-
if builder.config.lld_enabled
1330-
&& (builder.config.channel == "dev" || builder.config.channel == "nightly")
1331-
{
1329+
if builder.config.lld_enabled {
13321330
cargo.env("CFG_USE_SELF_CONTAINED_LINKER", "1");
13331331
}
13341332

src/bootstrap/src/core/config/config.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2464,7 +2464,6 @@ impl Config {
24642464
// build our internal lld and use it as the default linker, by setting the `rust.lld` config
24652465
// to true by default:
24662466
// - on the `x86_64-unknown-linux-gnu` target
2467-
// - on the `dev` and `nightly` channels
24682467
// - when building our in-tree llvm (i.e. the target has not set an `llvm-config`), so that
24692468
// we're also able to build the corresponding lld
24702469
// - or when using an external llvm that's downloaded from CI, which also contains our prebuilt
@@ -2473,10 +2472,7 @@ impl Config {
24732472
// thus, disabled
24742473
// - similarly, lld will not be built nor used by default when explicitly asked not to, e.g.
24752474
// when the config sets `rust.lld = false`
2476-
if config.build.triple == "x86_64-unknown-linux-gnu"
2477-
&& config.hosts == [config.build]
2478-
&& (config.channel == "dev" || config.channel == "nightly")
2479-
{
2475+
if config.build.triple == "x86_64-unknown-linux-gnu" && config.hosts == [config.build] {
24802476
let no_llvm_config = config
24812477
.target_config
24822478
.get(&config.build)

0 commit comments

Comments
 (0)