-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Closed
Copy link
Labels
C-bugCategory: This is a bug.Category: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Description
The incorrect way: assuming llvm-dwp
exists in the parent directory of the path provided for llvm-config
. In general these two paths cannot be assumed to have any relationship to one another.
Lines 1075 to 1079 in 87bacf2
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)); |
The correct way: run llvm-config --bindir
using the provided llvm-config, and pick llvm-dwp
inside of the directory that it returns. Bootstrap does this correctly elsewhere, such as for FileCheck:
Lines 669 to 671 in 87bacf2
} else if let Some(s) = target_config.and_then(|c| c.llvm_config.as_ref()) { | |
let llvm_bindir = output(Command::new(s).arg("--bindir")); | |
let filecheck = Path::new(llvm_bindir.trim()).join(exe("FileCheck", target)); |
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)