Skip to content

Commit f809f9e

Browse files
committed
bootstrap now takes care of installing xargo
1 parent 1166db7 commit f809f9e

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed

src/bootstrap/test.rs

+21-4
Original file line numberDiff line numberDiff line change
@@ -386,8 +386,27 @@ impl Step for Miri {
386386
extra_features: Vec::new(),
387387
});
388388
if let Some(miri) = miri {
389+
// # Install xargo.
390+
let mut cargo = tool::prepare_tool_cargo(
391+
builder,
392+
compiler,
393+
Mode::ToolRustc,
394+
host,
395+
"install",
396+
"src/tools/miri",
397+
SourceType::Submodule,
398+
&[],
399+
);
400+
cargo.arg("xargo");
401+
// Configure `cargo install` path. cargo adds a `bin/`.
402+
cargo.env("CARGO_INSTALL_ROOT", &builder.out);
403+
404+
let mut cargo = Command::from(cargo);
405+
if !try_run(builder, &mut cargo) {
406+
return;
407+
}
408+
389409
// # Run `cargo miri setup`.
390-
// As a side-effect, this will install xargo.
391410
let mut cargo = tool::prepare_tool_cargo(
392411
builder,
393412
compiler,
@@ -412,9 +431,7 @@ impl Step for Miri {
412431
cargo.env("XARGO_RUST_SRC", builder.src.join("src"));
413432
// Debug things.
414433
cargo.env("RUST_BACKTRACE", "1");
415-
// Configure `cargo install` path, and let cargo-miri know that that's where
416-
// xargo ends up.
417-
cargo.env("CARGO_INSTALL_ROOT", &builder.out); // cargo adds a `bin/`
434+
// Let cargo-miri know where xargo ended up.
418435
cargo.env("XARGO", builder.out.join("bin").join("xargo"));
419436

420437
let mut cargo = Command::from(cargo);

0 commit comments

Comments
 (0)