Skip to content

Commit 42c1e77

Browse files
committed
Auto merge of #980 - JOE1994:master, r=RalfJung
change cargo-miri.rs to fix issue #978 In Windows 10, there was an issue with building MIRI locally and getting it running, due to unpredictable backslash escaping issues in paths. I added a code snippet that would only be compiled in Windows OS, which replaces all backslashes in paths to slashes. This fix should only affect Windows users. Building and testing MIRI locally now works fine after the fix. ![miri_result_after_fix0](https://user-images.githubusercontent.com/10286488/66260998-344abc80-e794-11e9-9d7c-b4ef098443de.PNG) Fixes #978
2 parents d902a11 + 65fd006 commit 42c1e77

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bin/cargo-miri.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ path = "lib.rs"
340340
let sysroot = if is_host { dir.join("HOST") } else { PathBuf::from(dir) };
341341
std::env::set_var("MIRI_SYSROOT", &sysroot); // pass the env var to the processes we spawn, which will turn it into "--sysroot" flags
342342
if print_env {
343-
println!("MIRI_SYSROOT={}", sysroot.display());
343+
println!("MIRI_SYSROOT='{}'", sysroot.display().to_string().replace('\'', r#"'"'"'"#));
344344
} else if !ask_user {
345345
println!("A libstd for Miri is now available in `{}`.", sysroot.display());
346346
}

0 commit comments

Comments
 (0)