Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare Miri for rustc bootstrap building a separate libstd for it #870

Merged
merged 2 commits into from
Aug 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/bin/cargo-miri.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,13 @@ fn test_sysroot_consistency() {
.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()));

Expand Down
2 changes: 0 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,5 @@ pub use crate::eval::{eval_main, create_ecx, MiriConfig};
/// 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"]
}