mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
use LLD by default on x64 regardless of channel
This commit is contained in:
@@ -1369,9 +1369,7 @@ pub fn rustc_cargo_env(
|
||||
}
|
||||
|
||||
// Enable rustc's env var for `rust-lld` when requested.
|
||||
if builder.config.lld_enabled
|
||||
&& (builder.config.channel == "dev" || builder.config.channel == "nightly")
|
||||
{
|
||||
if builder.config.lld_enabled {
|
||||
cargo.env("CFG_USE_SELF_CONTAINED_LINKER", "1");
|
||||
}
|
||||
|
||||
|
||||
@@ -619,7 +619,6 @@ pub fn apply_rust_config(
|
||||
// build our internal lld and use it as the default linker, by setting the `rust.lld` config
|
||||
// to true by default:
|
||||
// - on the `x86_64-unknown-linux-gnu` target
|
||||
// - on the `dev` and `nightly` channels
|
||||
// - when building our in-tree llvm (i.e. the target has not set an `llvm-config`), so that
|
||||
// we're also able to build the corresponding lld
|
||||
// - or when using an external llvm that's downloaded from CI, which also contains our prebuilt
|
||||
@@ -628,9 +627,7 @@ pub fn apply_rust_config(
|
||||
// thus, disabled
|
||||
// - similarly, lld will not be built nor used by default when explicitly asked not to, e.g.
|
||||
// when the config sets `rust.lld = false`
|
||||
if self.host_target.triple == "x86_64-unknown-linux-gnu"
|
||||
&& self.hosts == [self.host_target]
|
||||
&& (self.channel == "dev" || self.channel == "nightly")
|
||||
if self.host_target.triple == "x86_64-unknown-linux-gnu" && self.hosts == [self.host_target]
|
||||
{
|
||||
let no_llvm_config = self
|
||||
.target_config
|
||||
|
||||
Reference in New Issue
Block a user