Skip to content

Commit 02bba3f

Browse files
committed
Auto merge of #1124 - RalfJung:sysroot-check, r=oli-obk
disable sysroot checks for distributed binaries This should help with mozilla/nixpkgs-mozilla#198.
2 parents 2a08c63 + bc715cb commit 02bba3f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/bin/cargo-miri.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,11 @@ fn test_sysroot_consistency() {
160160
.unwrap_or_else(|_| panic!("Failed to canonicalize sysroot: {}", stdout))
161161
}
162162

163-
// We let the user skip this check if they really want to.
164-
// (`bootstrap` needs this because Miri gets built by the stage1 compiler
165-
// but run with the stage2 sysroot.)
166-
if std::env::var("MIRI_SKIP_SYSROOT_CHECK").is_ok() {
163+
// Do not check sysroots if we got built as part of a Rust distribution.
164+
// During `bootstrap`, the sysroot does not match anyway, and then some distros
165+
// play symlink tricks so the sysroots may be different even for the final stage
166+
// (see <https://github.com/mozilla/nixpkgs-mozilla/issues/198>).
167+
if option_env!("RUSTC_STAGE").is_some() {
167168
return;
168169
}
169170

0 commit comments

Comments
 (0)