diff options
| author | David Tolnay <dtolnay@gmail.com> | 2021-02-09 19:04:29 -0800 |
|---|---|---|
| committer | David Tolnay <dtolnay@gmail.com> | 2021-02-09 20:39:54 -0800 |
| commit | d3fea13ae0949a64b5809ba6a7304307ddf3528e (patch) | |
| tree | f5ef43fdbb28958f2c7cdd693bf3ed580760d54e | |
| parent | 87bacf22ec93a9479dbd829de5d1917c16b17255 (diff) | |
| download | rust-d3fea13ae0949a64b5809ba6a7304307ddf3528e.tar.gz rust-d3fea13ae0949a64b5809ba6a7304307ddf3528e.zip | |
bootstrap: Locate llvm-dwp based on llvm-config bindir
| -rw-r--r-- | src/bootstrap/compile.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs index 833c13e9a26..dee0c154201 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs @@ -1075,8 +1075,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, |
