about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm
diff options
context:
space:
mode:
authorAntoni Boucher <bouanto@zoho.com>2025-09-28 12:08:44 -0400
committerAntoni Boucher <bouanto@zoho.com>2025-09-28 13:57:33 -0400
commit7fcbc5ea465a4e280d3b7a84fc3f781e9a120ed0 (patch)
treec77bb7d892226e63dfc6b82529cf724ff7b5ad5c /compiler/rustc_codegen_llvm
parenta00a5159cfac23e9b1551566cf71ff31edc1f11b (diff)
downloadrust-7fcbc5ea465a4e280d3b7a84fc3f781e9a120ed0.tar.gz
rust-7fcbc5ea465a4e280d3b7a84fc3f781e9a120ed0.zip
Add a leading dash to linker plugin arguments in the gcc codegen
Diffstat (limited to 'compiler/rustc_codegen_llvm')
-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 13bdb7cb1a2..e96eb304c50 100644
--- a/compiler/rustc_codegen_llvm/src/lib.rs
+++ b/compiler/rustc_codegen_llvm/src/lib.rs
@@ -231,6 +231,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
     }
@@ -349,7 +353,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(),
+        );
     }
 }