From 61b5cc96337da2121221dd1bcdb63fd36551d065 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Wed, 1 Nov 2023 15:21:15 -0700 Subject: [PATCH] Use lld provided by system --- compiler/rustc_target/src/spec/base/wasm.rs | 3 +-- compiler/rustc_target/src/spec/targets/x86_64_unknown_none.rs | 2 +- compiler/rustc_target/src/spec/targets/x86_64_unknown_uefi.rs | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/rustc_target/src/spec/base/wasm.rs b/compiler/rustc_target/src/spec/base/wasm.rs index 87ade9e58cf4..2ddff95febab 100644 --- a/compiler/rustc_target/src/spec/base/wasm.rs +++ b/compiler/rustc_target/src/spec/base/wasm.rs @@ -91,8 +91,7 @@ macro_rules! args { // arguments just yet limit_rdylib_exports: false, - // we use the LLD shipped with the Rust toolchain by default - linker: Some("rust-lld".into()), + linker: Some("lld".into()), linker_flavor: LinkerFlavor::WasmLld(Cc::No), pre_link_args, diff --git a/compiler/rustc_target/src/spec/targets/x86_64_unknown_none.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_none.rs index 9aa95a35f8e5..a9172f9441b7 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_unknown_none.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_none.rs @@ -17,7 +17,7 @@ pub fn target() -> Target { static_position_independent_executables: true, relro_level: RelroLevel::Full, linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes), - linker: Some("rust-lld".into()), + linker: Some("lld".into()), features: "-mmx,-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-3dnow,-3dnowa,-avx,-avx2,+soft-float" .into(), diff --git a/compiler/rustc_target/src/spec/targets/x86_64_unknown_uefi.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_uefi.rs index 5abfb8162f70..13cb43bda1a4 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_unknown_uefi.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_uefi.rs @@ -16,6 +16,7 @@ pub fn target() -> Target { base.plt_by_default = false; base.max_atomic_width = Some(64); base.entry_abi = Conv::X86_64Win64; + base.linker = Some("lld".into()); // We disable MMX and SSE for now, even though UEFI allows using them. Problem is, you have to // enable these CPU features explicitly before their first use, otherwise their instructions -- 2.41.0