File tree Expand file tree Collapse file tree 1 file changed +21
-4
lines changed Expand file tree Collapse file tree 1 file changed +21
-4
lines changed Original file line number Diff line number Diff 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) ;
You can’t perform that action at this time.
0 commit comments