File tree 1 file changed +4
-6
lines changed
1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -427,7 +427,7 @@ impl Step for Miri {
427
427
// (We do this separately from the above so that when the setup actually
428
428
// happens we get some output.)
429
429
// We re-use the `cargo` from above.
430
- cargo. arg ( "--env " ) ;
430
+ cargo. arg ( "--print-sysroot " ) ;
431
431
432
432
// FIXME: Is there a way in which we can re-use the usual `run` helpers?
433
433
let miri_sysroot = if builder. config . dry_run {
@@ -437,13 +437,11 @@ impl Step for Miri {
437
437
let out = cargo. output ( )
438
438
. expect ( "We already ran `cargo miri setup` before and that worked" ) ;
439
439
assert ! ( out. status. success( ) , "`cargo miri setup` returned with non-0 exit code" ) ;
440
- // Output is "MIRI_SYSROOT=<str >\n".
440
+ // Output is "<sysroot >\n".
441
441
let stdout = String :: from_utf8 ( out. stdout )
442
442
. expect ( "`cargo miri setup` stdout is not valid UTF-8" ) ;
443
- let stdout = stdout. trim ( ) ;
444
- builder. verbose ( & format ! ( "`cargo miri setup --env` returned: {:?}" , stdout) ) ;
445
- let sysroot = stdout. splitn ( 2 , '=' )
446
- . nth ( 1 ) . expect ( "`cargo miri setup` stdout did not contain '='" ) ;
443
+ let sysroot = stdout. trim_end ( ) ;
444
+ builder. verbose ( & format ! ( "`cargo miri setup --print-sysroot` said: {:?}" , sysroot) ) ;
447
445
sysroot. to_owned ( )
448
446
} ;
449
447
You can’t perform that action at this time.
0 commit comments