about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-02-09 10:42:15 +0000
committerbors <bors@rust-lang.org>2023-02-09 10:42:15 +0000
commit5919f62cf6681979cb5401d3907445f14d27ec8f (patch)
tree3c13a999562eee41ed85e413270c4e7f6a78c8ef /compiler/rustc_codegen_llvm/src
parentc40919b7a75f93ed7ef040361e82c656d246d41e (diff)
parentf2a2e298bafd113fc277ce6fc53df340f55c3cd0 (diff)
downloadrust-5919f62cf6681979cb5401d3907445f14d27ec8f.tar.gz
rust-5919f62cf6681979cb5401d3907445f14d27ec8f.zip
Auto merge of #107840 - matthiaskrgr:rollup-e6v7x0a, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #107446 (Migrate some of `rustc_parse` to derive diagnostics)
 - #107752 (Specify dlltool prefix when generating import libs)
 - #107808 (bootstrap.py: fix build-failure message)
 - #107834 (create symlink for legacy rustfmt path)
 - #107835 (use idiomatic formatting)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
-rw-r--r--compiler/rustc_codegen_llvm/src/back/archive.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/back/archive.rs b/compiler/rustc_codegen_llvm/src/back/archive.rs
index 58ca87524de..dd3268d7780 100644
--- a/compiler/rustc_codegen_llvm/src/back/archive.rs
+++ b/compiler/rustc_codegen_llvm/src/back/archive.rs
@@ -183,6 +183,12 @@ impl ArchiveBuilderBuilder for LlvmArchiveBuilderBuilder {
             // able to control the *exact* spelling of each of the symbols that are being imported:
             // hence we don't want `dlltool` adding leading underscores automatically.
             let dlltool = find_binutils_dlltool(sess);
+            let temp_prefix = {
+                let mut path = PathBuf::from(&output_path);
+                path.pop();
+                path.push(lib_name);
+                path
+            };
             let result = std::process::Command::new(dlltool)
                 .args([
                     "-d",
@@ -192,6 +198,8 @@ impl ArchiveBuilderBuilder for LlvmArchiveBuilderBuilder {
                     "-l",
                     output_path.to_str().unwrap(),
                     "--no-leading-underscore",
+                    "--temp-prefix",
+                    temp_prefix.to_str().unwrap(),
                 ])
                 .output();