File tree 1 file changed +21
-4
lines changed
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 {
386
386
extra_features : Vec :: new ( ) ,
387
387
} ) ;
388
388
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
+
389
409
// # Run `cargo miri setup`.
390
- // As a side-effect, this will install xargo.
391
410
let mut cargo = tool:: prepare_tool_cargo (
392
411
builder,
393
412
compiler,
@@ -412,9 +431,7 @@ impl Step for Miri {
412
431
cargo. env ( "XARGO_RUST_SRC" , builder. src . join ( "src" ) ) ;
413
432
// Debug things.
414
433
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.
418
435
cargo. env ( "XARGO" , builder. out . join ( "bin" ) . join ( "xargo" ) ) ;
419
436
420
437
let mut cargo = Command :: from ( cargo) ;
You can’t perform that action at this time.
0 commit comments