File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -333,7 +333,14 @@ path = "lib.rs"
333333 None => true ,
334334 Some ( target) => target == rustc_version:: version_meta ( ) . unwrap ( ) . host ,
335335 } ;
336- let sysroot = if is_host { dir. join ( "HOST" ) } else { PathBuf :: from ( dir) } ;
336+ let mut sysroot = if is_host { dir. join ( "HOST" ) } else { PathBuf :: from ( dir) } ;
337+ if cfg ! ( target_os = "windows" ) {
338+ // Replace backslashes in path to slashes as they cause problems.
339+ // Win10 Powershell can work with slashes in paths.
340+ sysroot = PathBuf :: from (
341+ String :: from ( sysroot. to_str ( ) . unwrap ( ) ) . replace ( "\\ " , "/" )
342+ ) ;
343+ }
337344 std:: env:: set_var ( "MIRI_SYSROOT" , & sysroot) ; // pass the env var to the processes we spawn, which will turn it into "--sysroot" flags
338345 if print_env {
339346 println ! ( "MIRI_SYSROOT={}" , sysroot. display( ) ) ;
You can’t perform that action at this time.
0 commit comments