Skip to content

Commit c905fd2

Browse files
committed
skip bootstrap target sanity checks when testing Miri
1 parent b03502b commit c905fd2

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

src/bootstrap/sanity.rs

+10
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,11 @@ than building it.
155155
continue;
156156
}
157157

158+
// Some environments don't want or need these tools, such as when testing Miri.
159+
if env::var_os("BOOTSTRAP_SKIP_TARGET_SANITY").is_some() {
160+
continue;
161+
}
162+
158163
if !build.config.dry_run {
159164
cmd_finder.must_have(build.cc(*target));
160165
if let Some(ar) = build.ar(*target) {
@@ -212,6 +217,11 @@ than building it.
212217
}
213218
}
214219

220+
// Some environments don't want or need these tools, such as when testing Miri.
221+
if env::var_os("BOOTSTRAP_SKIP_TARGET_SANITY").is_some() {
222+
continue;
223+
}
224+
215225
if need_cmake && target.contains("msvc") {
216226
// There are three builds of cmake on windows: MSVC, MinGW, and
217227
// Cygwin. The Cygwin build does not have generators for Visual

src/ci/docker/host-x86_64/x86_64-gnu-tools/checktools.sh

+4-7
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,7 @@ python3 "$X_PY" test --stage 2 src/tools/rustfmt
2727
python3 "$X_PY" test --stage 2 src/tools/miri
2828
# We natively run this script on x86_64-unknown-linux-gnu and x86_64-pc-windows-msvc.
2929
# Also cover some other targets (on both of these hosts) via cross-testing.
30-
#
31-
# Currently disabled -- we end up pulling in a cross-compile of LLVM (maybe
32-
# just overly eager sanity checks), but in any case this won't work when
33-
# building LLVM as of this comment.
34-
#python3 "$X_PY" test --stage 2 src/tools/miri --target i686-pc-windows-msvc
35-
#FIXME(https://github.com/rust-lang/rust/issues/103519): macOS testing is currently disabled
36-
# python3 "$X_PY" test --stage 2 src/tools/miri --target aarch64-apple-darwin
30+
export BOOTSTRAP_SKIP_TARGET_SANITY=1 # we don't need `cc` for these targets
31+
python3 "$X_PY" test --stage 2 src/tools/miri --target i686-pc-windows-msvc
32+
python3 "$X_PY" test --stage 2 src/tools/miri --target aarch64-apple-darwin
33+
unset BOOTSTRAP_SKIP_TARGET_SANITY

0 commit comments

Comments
 (0)