about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorStuart Cook <Zalathar@users.noreply.github.com>2025-09-29 11:56:44 +1000
committerGitHub <noreply@github.com>2025-09-29 11:56:44 +1000
commitaf8af6cc6a40fe32e791a94196329db25b597ee6 (patch)
tree60a6aee55f7c807d275aaad1b2a4e58928db6417 /compiler/rustc_codegen_llvm/src
parent1ef1d3bc28914fb89fd6a088e6259a689f7e3f38 (diff)
parent7fcbc5ea465a4e280d3b7a84fc3f781e9a120ed0 (diff)
downloadrust-af8af6cc6a40fe32e791a94196329db25b597ee6.tar.gz
rust-af8af6cc6a40fe32e791a94196329db25b597ee6.zip
Rollup merge of #147127 - antoyo:fix/gcc-linker-plugin, r=bjorn3
Add a leading dash to linker plugin arguments in the gcc codegen

Fix rust-lang/rust#130583

r? ``@bjorn3``
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
-rw-r--r--compiler/rustc_codegen_llvm/src/lib.rs13
1 files changed, 12 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/lib.rs b/compiler/rustc_codegen_llvm/src/lib.rs
index b9584a9117f..2405a25c702 100644
--- a/compiler/rustc_codegen_llvm/src/lib.rs
+++ b/compiler/rustc_codegen_llvm/src/lib.rs
@@ -232,6 +232,10 @@ impl CodegenBackend for LlvmCodegenBackend {
         crate::DEFAULT_LOCALE_RESOURCE
     }
 
+    fn name(&self) -> &'static str {
+        "llvm"
+    }
+
     fn init(&self, sess: &Session) {
         llvm_util::init(sess); // Make sure llvm is inited
     }
@@ -350,7 +354,14 @@ impl CodegenBackend for LlvmCodegenBackend {
 
         // Run the linker on any artifacts that resulted from the LLVM run.
         // This should produce either a finished executable or library.
-        link_binary(sess, &LlvmArchiveBuilderBuilder, codegen_results, metadata, outputs);
+        link_binary(
+            sess,
+            &LlvmArchiveBuilderBuilder,
+            codegen_results,
+            metadata,
+            outputs,
+            self.name(),
+        );
     }
 }