Skip to content

Commit

Permalink
bootstrap now takes care of installing xargo
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Oct 26, 2019
1 parent 1166db7 commit f809f9e
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions src/bootstrap/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,27 @@ impl Step for Miri {
extra_features: Vec::new(),
});
if let Some(miri) = miri {
// # Install xargo.
let mut cargo = tool::prepare_tool_cargo(
builder,
compiler,
Mode::ToolRustc,
host,
"install",
"src/tools/miri",
SourceType::Submodule,
&[],
);
cargo.arg("xargo");
// Configure `cargo install` path. cargo adds a `bin/`.
cargo.env("CARGO_INSTALL_ROOT", &builder.out);

let mut cargo = Command::from(cargo);
if !try_run(builder, &mut cargo) {
return;
}

// # Run `cargo miri setup`.
// As a side-effect, this will install xargo.
let mut cargo = tool::prepare_tool_cargo(
builder,
compiler,
Expand All @@ -412,9 +431,7 @@ impl Step for Miri {
cargo.env("XARGO_RUST_SRC", builder.src.join("src"));
// Debug things.
cargo.env("RUST_BACKTRACE", "1");
// Configure `cargo install` path, and let cargo-miri know that that's where
// xargo ends up.
cargo.env("CARGO_INSTALL_ROOT", &builder.out); // cargo adds a `bin/`
// Let cargo-miri know where xargo ended up.
cargo.env("XARGO", builder.out.join("bin").join("xargo"));

let mut cargo = Command::from(cargo);
Expand Down

0 comments on commit f809f9e

Please sign in to comment.