summary refs log tree commit diff
path: root/src/bootstrap/compile.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-02-10 17:36:11 +0000
committerbors <bors@rust-lang.org>2021-02-10 17:36:11 +0000
commitcb75ad5db02783e8b0222fee363c5f63f7e2cf5b (patch)
tree346ca2d8767c664ea828e35385a8194e4ddbdcf6 /src/bootstrap/compile.rs
parent690501e3e9535389a1441cee74d049ba16b963fa (diff)
parenta7f4cce1cef081595da9e1a77157460e9a0a950a (diff)
downloadrust-1.50.0.tar.gz
rust-1.50.0.zip
Auto merge of #81963 - pietroalbini:stable-1.50.0-pre2, r=pietroalbini 1.50.0
Rebuild 1.50.0 stable

This PR rebuilds the 1.50.0 stable release with the following backport:

*  bootstrap: Locate llvm-dwp based on llvm-config bindir #81955

cc `@rust-lang/release`
Diffstat (limited to 'src/bootstrap/compile.rs')
-rw-r--r--src/bootstrap/compile.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
index 091bd2a1c5a..a31c87d4311 100644
--- a/src/bootstrap/compile.rs
+++ b/src/bootstrap/compile.rs
@@ -1021,8 +1021,11 @@ impl Step for Assemble {
             let src_exe = exe("llvm-dwp", target_compiler.host);
             let dst_exe = exe("rust-llvm-dwp", target_compiler.host);
             let llvm_config_bin = builder.ensure(native::Llvm { target: target_compiler.host });
-            let llvm_bin_dir = llvm_config_bin.parent().unwrap();
-            builder.copy(&llvm_bin_dir.join(&src_exe), &libdir_bin.join(&dst_exe));
+            if !builder.config.dry_run {
+                let llvm_bin_dir = output(Command::new(llvm_config_bin).arg("--bindir"));
+                let llvm_bin_dir = Path::new(llvm_bin_dir.trim());
+                builder.copy(&llvm_bin_dir.join(&src_exe), &libdir_bin.join(&dst_exe));
+            }
         }
 
         // Ensure that `libLLVM.so` ends up in the newly build compiler directory,