mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
fix testing Miri with --stage 0
This commit is contained in:
parent
2f601ef527
commit
9e674af669
@ -709,7 +709,15 @@ impl<'a> Builder<'a> {
|
||||
return;
|
||||
}
|
||||
|
||||
add_dylib_path(vec![self.rustc_libdir(compiler)], cmd);
|
||||
let mut dylib_dirs = vec![self.rustc_libdir(compiler)];
|
||||
|
||||
// Ensure that the downloaded LLVM libraries can be found.
|
||||
if self.config.llvm_from_ci {
|
||||
let ci_llvm_lib = self.out.join(&*compiler.host.triple).join("ci-llvm").join("lib");
|
||||
dylib_dirs.push(ci_llvm_lib);
|
||||
}
|
||||
|
||||
add_dylib_path(dylib_dirs, cmd);
|
||||
}
|
||||
|
||||
/// Gets a path to the compiler specified.
|
||||
|
@ -449,6 +449,7 @@ impl Step for Miri {
|
||||
SourceType::Submodule,
|
||||
&[],
|
||||
);
|
||||
cargo.add_rustc_lib_path(builder, compiler);
|
||||
cargo.arg("--").arg("miri").arg("setup");
|
||||
|
||||
// Tell `cargo miri setup` where to find the sources.
|
||||
@ -500,6 +501,7 @@ impl Step for Miri {
|
||||
SourceType::Submodule,
|
||||
&[],
|
||||
);
|
||||
cargo.add_rustc_lib_path(builder, compiler);
|
||||
|
||||
// miri tests need to know about the stage sysroot
|
||||
cargo.env("MIRI_SYSROOT", miri_sysroot);
|
||||
@ -508,8 +510,6 @@ impl Step for Miri {
|
||||
|
||||
cargo.arg("--").args(builder.config.cmd.test_args());
|
||||
|
||||
cargo.add_rustc_lib_path(builder, compiler);
|
||||
|
||||
let mut cargo = Command::from(cargo);
|
||||
if !try_run(builder, &mut cargo) {
|
||||
return;
|
||||
|
@ -45,6 +45,7 @@ pub fn libdir(target: TargetSelection) -> &'static str {
|
||||
}
|
||||
|
||||
/// Adds a list of lookup paths to `cmd`'s dynamic library lookup path.
|
||||
/// If The dylib_path_par is already set for this cmd, the old value will be overwritten!
|
||||
pub fn add_dylib_path(path: Vec<PathBuf>, cmd: &mut Command) {
|
||||
let mut list = dylib_path();
|
||||
for path in path {
|
||||
|
Loading…
Reference in New Issue
Block a user