Auto merge of #870 - RalfJung:miri-rustc, r=oli-obk
Prepare Miri for rustc bootstrap building a separate libstd for it
This commit is contained in:
commit
f0e871785f
@ -141,6 +141,13 @@ fn get_sysroot(mut cmd: Command) -> PathBuf {
|
||||
.unwrap_or_else(|_| panic!("Failed to canonicalize sysroot: {}", stdout))
|
||||
}
|
||||
|
||||
// We let the user skip this check if they really want to.
|
||||
// (`bootstrap` needs this because Miri gets built by the stage1 compiler
|
||||
// but run with the stage2 sysroot.)
|
||||
if std::env::var("MIRI_SKIP_SYSROOT_CHECK").is_ok() {
|
||||
return;
|
||||
}
|
||||
|
||||
let rustc_sysroot = get_sysroot(Command::new("rustc"));
|
||||
let miri_sysroot = get_sysroot(Command::new(find_miri()));
|
||||
|
||||
|
@ -47,7 +47,5 @@
|
||||
/// Insert rustc arguments at the beginning of the argument list that Miri wants to be
|
||||
/// set per default, for maximal validation power.
|
||||
pub fn miri_default_args() -> &'static [&'static str] {
|
||||
// The flags here should be kept in sync with what bootstrap adds when `test-miri` is
|
||||
// set, which happens in `bootstrap/bin/rustc.rs` in the rustc sources.
|
||||
&["-Zalways-encode-mir", "-Zmir-emit-retag", "-Zmir-opt-level=0", "--cfg=miri"]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user