Skip to content

Commit

Permalink
skip bootstrap target sanity checks when testing Miri
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Oct 30, 2022
1 parent b03502b commit c905fd2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
10 changes: 10 additions & 0 deletions src/bootstrap/sanity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,11 @@ than building it.
continue;
}

// Some environments don't want or need these tools, such as when testing Miri.
if env::var_os("BOOTSTRAP_SKIP_TARGET_SANITY").is_some() {
continue;
}

if !build.config.dry_run {
cmd_finder.must_have(build.cc(*target));
if let Some(ar) = build.ar(*target) {
Expand Down Expand Up @@ -212,6 +217,11 @@ than building it.
}
}

// Some environments don't want or need these tools, such as when testing Miri.
if env::var_os("BOOTSTRAP_SKIP_TARGET_SANITY").is_some() {
continue;
}

if need_cmake && target.contains("msvc") {
// There are three builds of cmake on windows: MSVC, MinGW, and
// Cygwin. The Cygwin build does not have generators for Visual
Expand Down
11 changes: 4 additions & 7 deletions src/ci/docker/host-x86_64/x86_64-gnu-tools/checktools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ python3 "$X_PY" test --stage 2 src/tools/rustfmt
python3 "$X_PY" test --stage 2 src/tools/miri
# We natively run this script on x86_64-unknown-linux-gnu and x86_64-pc-windows-msvc.
# Also cover some other targets (on both of these hosts) via cross-testing.
#
# Currently disabled -- we end up pulling in a cross-compile of LLVM (maybe
# just overly eager sanity checks), but in any case this won't work when
# building LLVM as of this comment.
#python3 "$X_PY" test --stage 2 src/tools/miri --target i686-pc-windows-msvc
#FIXME(/~https://github.com/rust-lang/rust/issues/103519): macOS testing is currently disabled
# python3 "$X_PY" test --stage 2 src/tools/miri --target aarch64-apple-darwin
export BOOTSTRAP_SKIP_TARGET_SANITY=1 # we don't need `cc` for these targets
python3 "$X_PY" test --stage 2 src/tools/miri --target i686-pc-windows-msvc
python3 "$X_PY" test --stage 2 src/tools/miri --target aarch64-apple-darwin
unset BOOTSTRAP_SKIP_TARGET_SANITY

0 comments on commit c905fd2

Please sign in to comment.