File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 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 {
427427 // (We do this separately from the above so that when the setup actually
428428 // happens we get some output.)
429429 // We re-use the `cargo` from above.
430- cargo. arg ( "--env " ) ;
430+ cargo. arg ( "--print-sysroot " ) ;
431431
432432 // FIXME: Is there a way in which we can re-use the usual `run` helpers?
433433 let miri_sysroot = if builder. config . dry_run {
@@ -437,13 +437,11 @@ impl Step for Miri {
437437 let out = cargo. output ( )
438438 . expect ( "We already ran `cargo miri setup` before and that worked" ) ;
439439 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".
441441 let stdout = String :: from_utf8 ( out. stdout )
442442 . 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) ) ;
447445 sysroot. to_owned ( )
448446 } ;
449447
You can’t perform that action at this time.
0 commit comments