Skip to content

Commit

Permalink
Auto merge of #980 - JOE1994:master, r=RalfJung
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bors committed Oct 15, 2019
2 parents d902a11 + 65fd006 commit 42c1e77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bin/cargo-miri.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ path = "lib.rs"
let sysroot = if is_host { dir.join("HOST") } else { PathBuf::from(dir) };
std::env::set_var("MIRI_SYSROOT", &sysroot); // pass the env var to the processes we spawn, which will turn it into "--sysroot" flags
if print_env {
println!("MIRI_SYSROOT={}", sysroot.display());
println!("MIRI_SYSROOT='{}'", sysroot.display().to_string().replace('\'', r#"'"'"'"#));
} else if !ask_user {
println!("A libstd for Miri is now available in `{}`.", sysroot.display());
}
Expand Down

0 comments on commit 42c1e77

Please sign in to comment.