2023-12-31 19:00:36 +00:00
|
|
|
From 61b5cc96337da2121221dd1bcdb63fd36551d065 Mon Sep 17 00:00:00 2001
|
2023-11-16 16:50:29 +00:00
|
|
|
From: Josh Stone <jistone@redhat.com>
|
|
|
|
Date: Wed, 1 Nov 2023 15:21:15 -0700
|
|
|
|
Subject: [PATCH] Use lld provided by system
|
|
|
|
|
|
|
|
---
|
2023-12-31 19:00:36 +00:00
|
|
|
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 +
|
2023-11-16 16:50:29 +00:00
|
|
|
3 files changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
|
2023-12-31 19:00:36 +00:00
|
|
|
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 {
|
2023-09-25 20:45:57 +00:00
|
|
|
// 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,
|
2023-12-31 19:00:36 +00:00
|
|
|
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
|
2023-09-25 20:45:57 +00:00
|
|
|
@@ -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(),
|
2023-12-31 19:00:36 +00:00
|
|
|
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 {
|
2023-09-25 20:45:57 +00:00
|
|
|
base.plt_by_default = false;
|
|
|
|
base.max_atomic_width = Some(64);
|
2023-11-16 16:50:29 +00:00
|
|
|
base.entry_abi = Conv::X86_64Win64;
|
2023-09-25 20:45:57 +00:00
|
|
|
+ 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
|
2024-04-19 18:17:24 +00:00
|
|
|
diff -Naur a/compiler/rustc_target/src/spec/targets/aarch64_unknown_none_softfloat.rs b/compiler/rustc_target/src/spec/targets/aarch64_unknown_none_softfloat.rs
|
|
|
|
--- a/compiler/rustc_target/src/spec/targets/aarch64_unknown_none_softfloat.rs 2024-03-17 12:03:00.000000000 -0700
|
|
|
|
+++ b/compiler/rustc_target/src/spec/targets/aarch64_unknown_none_softfloat.rs 2024-03-22 10:02:17.742806274 -0700
|
|
|
|
@@ -14,7 +14,7 @@
|
|
|
|
let opts = TargetOptions {
|
|
|
|
abi: "softfloat".into(),
|
|
|
|
linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes),
|
|
|
|
- linker: Some("rust-lld".into()),
|
|
|
|
+ linker: Some("lld".into()),
|
|
|
|
features: "+v8a,+strict-align,-neon,-fp-armv8".into(),
|
|
|
|
relocation_model: RelocModel::Static,
|
|
|
|
disable_redzone: true,
|
2023-11-16 16:50:29 +00:00
|
|
|
--
|
|
|
|
2.41.0
|
|
|
|
|