rustbuild: Fix MSBuild location of llvm-config.exe
For LLD integration the path to `llvm-config` needed to change to inside the build directory itself (for whatever reason) but the build directory is different on MSBuild than it is on `ninja` for MSVC builds, so the path to `llvm-config.exe` was actually wrong and not working! This commit removes the `Build::llvm_config` function in favor of the source of truth, the `Llvm` build step itself. The build step was then updated to find the right build directory for MSBuild as well as `ninja` for where `llvm-config.exe` is located. Closes #48749
This commit is contained in:
parent
fedce67cd2
commit
be902e7168
6 changed files with 20 additions and 24 deletions
|
|
@ -915,7 +915,10 @@ impl Step for Compiletest {
|
|||
}
|
||||
|
||||
if build.config.llvm_enabled {
|
||||
let llvm_config = build.llvm_config(build.config.build);
|
||||
let llvm_config = builder.ensure(native::Llvm {
|
||||
target: build.config.build,
|
||||
emscripten: false,
|
||||
});
|
||||
let llvm_version = output(Command::new(&llvm_config).arg("--version"));
|
||||
cmd.arg("--llvm-version").arg(llvm_version);
|
||||
if !build.is_rust_llvm(target) {
|
||||
|
|
@ -1382,7 +1385,7 @@ impl Step for Crate {
|
|||
let mut cargo = builder.cargo(compiler, mode, target, test_kind.subcommand());
|
||||
match mode {
|
||||
Mode::Libstd => {
|
||||
compile::std_cargo(build, &compiler, target, &mut cargo);
|
||||
compile::std_cargo(builder, &compiler, target, &mut cargo);
|
||||
}
|
||||
Mode::Libtest => {
|
||||
compile::test_cargo(build, &compiler, target, &mut cargo);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue