File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -318,7 +318,12 @@ path = "lib.rs"
318
318
let target = get_arg_flag_value ( "--target" ) ;
319
319
let print_sysroot = !ask_user && has_arg_flag ( "--print-sysroot" ) ; // whether we just print the sysroot path
320
320
let mut command = xargo ( ) ;
321
- command. arg ( "build" ) . arg ( "-q" ) ;
321
+ // This may seen somewhat suprising - we are 'building' libstd
322
+ // by running (the equivalent of) `cargo check`. It turns out
323
+ // that `cargo check` has exactly the behavior that we want:
324
+ // it emits crate metadata (including MIR) without running any
325
+ // codegen.
326
+ command. arg ( "check" ) . arg ( "-q" ) ;
322
327
command. current_dir ( & dir) ;
323
328
command. env ( "RUSTFLAGS" , miri:: miri_default_args ( ) . join ( " " ) ) ;
324
329
command. env ( "XARGO_HOME" , dir. to_str ( ) . unwrap ( ) ) ;
You can’t perform that action at this time.
0 commit comments