@@ -497,9 +497,24 @@ path = "lib.rs"
497
497
// Disable debug assertions in the standard library -- Miri is already slow enough.
498
498
// But keep the overflow checks, they are cheap.
499
499
command. env ( "RUSTFLAGS" , "-Cdebug-assertions=off -Coverflow-checks=on" ) ;
500
+ // Manage the output the user sees.
501
+ if only_setup {
502
+ eprintln ! ( "Preparing a sysroot for Miri..." ) ;
503
+ } else {
504
+ eprint ! ( "Preparing a sysroot for Miri... " ) ;
505
+ command. stdout ( process:: Stdio :: null ( ) ) ;
506
+ command. stderr ( process:: Stdio :: null ( ) ) ;
507
+ }
500
508
// Finally run it!
501
509
if command. status ( ) . expect ( "failed to run xargo" ) . success ( ) . not ( ) {
502
- show_error ( format ! ( "failed to run xargo" ) ) ;
510
+ if only_setup {
511
+ show_error ( format ! ( "failed to run xargo, see error details above" ) )
512
+ } else {
513
+ show_error ( format ! ( "failed to run xargo; run `cargo miri setup` to see the error details" ) )
514
+ }
515
+ }
516
+ if !only_setup {
517
+ eprintln ! ( "done" ) ;
503
518
}
504
519
505
520
// That should be it! But we need to figure out where xargo built stuff.
@@ -510,10 +525,10 @@ path = "lib.rs"
510
525
// Figure out what to print.
511
526
let print_sysroot = only_setup && has_arg_flag ( "--print-sysroot" ) ; // whether we just print the sysroot path
512
527
if print_sysroot {
513
- // Print just the sysroot and nothing else; this way we do not need any escaping.
528
+ // Print just the sysroot and nothing else to stdout ; this way we do not need any escaping.
514
529
println ! ( "{}" , sysroot. display( ) ) ;
515
530
} else if only_setup {
516
- println ! ( "A libstd for Miri is now available in `{}`." , sysroot. display( ) ) ;
531
+ eprintln ! ( "A sysroot for Miri is now available in `{}`." , sysroot. display( ) ) ;
517
532
}
518
533
}
519
534
0 commit comments