Skip to content

Commit 9e98dfe

Browse files
dtolnaypietroalbini
authored andcommitted
bootstrap: Locate llvm-dwp based on llvm-config bindir
1 parent 0a6c6cc commit 9e98dfe

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/bootstrap/compile.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -1057,8 +1057,11 @@ impl Step for Assemble {
10571057
let src_exe = exe("llvm-dwp", target_compiler.host);
10581058
let dst_exe = exe("rust-llvm-dwp", target_compiler.host);
10591059
let llvm_config_bin = builder.ensure(native::Llvm { target: target_compiler.host });
1060-
let llvm_bin_dir = llvm_config_bin.parent().unwrap();
1061-
builder.copy(&llvm_bin_dir.join(&src_exe), &libdir_bin.join(&dst_exe));
1060+
if !builder.config.dry_run {
1061+
let llvm_bin_dir = output(Command::new(llvm_config_bin).arg("--bindir"));
1062+
let llvm_bin_dir = Path::new(llvm_bin_dir.trim());
1063+
builder.copy(&llvm_bin_dir.join(&src_exe), &libdir_bin.join(&dst_exe));
1064+
}
10621065
}
10631066

10641067
// Ensure that `libLLVM.so` ends up in the newly build compiler directory,

0 commit comments

Comments
 (0)