Skip to content

Commit 32bd4a8

Browse files
committed
use LLD by default on x64 regardless of channel
1 parent d9a7393 commit 32bd4a8

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
@@ -1340,9 +1340,7 @@ pub fn rustc_cargo_env(
13401340
}
13411341

13421342
// Enable rustc's env var for `rust-lld` when requested.
1343-
if builder.config.lld_enabled
1344-
&& (builder.config.channel == "dev" || builder.config.channel == "nightly")
1345-
{
1343+
if builder.config.lld_enabled {
13461344
cargo.env("CFG_USE_SELF_CONTAINED_LINKER", "1");
13471345
}
13481346

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2451,7 +2451,6 @@ impl Config {
24512451
// build our internal lld and use it as the default linker, by setting the `rust.lld` config
24522452
// to true by default:
24532453
// - on the `x86_64-unknown-linux-gnu` target
2454-
// - on the `dev` and `nightly` channels
24552454
// - when building our in-tree llvm (i.e. the target has not set an `llvm-config`), so that
24562455
// we're also able to build the corresponding lld
24572456
// - or when using an external llvm that's downloaded from CI, which also contains our prebuilt
@@ -2460,10 +2459,7 @@ impl Config {
24602459
// thus, disabled
24612460
// - similarly, lld will not be built nor used by default when explicitly asked not to, e.g.
24622461
// when the config sets `rust.lld = false`
2463-
if config.build.triple == "x86_64-unknown-linux-gnu"
2464-
&& config.hosts == [config.build]
2465-
&& (config.channel == "dev" || config.channel == "nightly")
2466-
{
2462+
if config.build.triple == "x86_64-unknown-linux-gnu" && config.hosts == [config.build] {
24672463
let no_llvm_config = config
24682464
.target_config
24692465
.get(&config.build)

0 commit comments

Comments
 (0)