Skip to content

Commit c1cb249

Browse files
committed
Auto merge of #900 - RalfJung:miri, r=RalfJung
local rustc builds now also need a sysroot built With the test-miri flag gone, the libstd of local builds isn't good enough for Miri any more.
2 parents 1766d1b + 68d7e4e commit c1cb249

File tree

1 file changed

+10
-18
lines changed

1 file changed

+10
-18
lines changed

miri

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -60,27 +60,19 @@ build_sysroot() {
6060
# Prepare and set MIRI_SYSROOT. Respects `MIRI_TEST_TARGET` and takes into account
6161
# locally built vs. distributed rustc.
6262
find_sysroot() {
63-
# Get ourselves a sysroot
6463
if [ -n "$MIRI_SYSROOT" ]; then
6564
# Sysroot already set, use that.
66-
true
67-
elif echo "$SYSROOT" | egrep -q 'build/[^/]+/stage'; then
68-
# A local rustc build.
69-
if [ -n "$MIRI_TEST_TARGET" ]; then
70-
# Foreign targets still need a build. Use the rustc sources.
71-
export XARGO_RUST_SRC="$SYSROOT/../../../src"
72-
build_sysroot --target "$MIRI_TEST_TARGET"
73-
else
74-
# Assume we have a proper host libstd in $SYSROOT.
75-
MIRI_SYSROOT="$SYSROOT"
76-
fi
65+
return 0
66+
fi
67+
# We need to build a sysroot.
68+
if echo "$SYSROOT" | egrep -q 'build/[^/]+/stage'; then
69+
# A local rustc build. Use its source dir.
70+
export XARGO_RUST_SRC="$SYSROOT/../../../src"
71+
fi
72+
if [ -n "$MIRI_TEST_TARGET" ]; then
73+
build_sysroot --target "$MIRI_TEST_TARGET"
7774
else
78-
# A normal toolchain. We have to build a sysroot either way.
79-
if [ -n "$MIRI_TEST_TARGET" ]; then
80-
build_sysroot --target "$MIRI_TEST_TARGET"
81-
else
82-
build_sysroot
83-
fi
75+
build_sysroot
8476
fi
8577
export MIRI_SYSROOT
8678
}

0 commit comments

Comments
 (0)