Skip to content

Commit c20217f

Browse files
committed
Auto merge of #2645 - RalfJung:miri-bench, r=RalfJung
fix ./miri bench Fixes #2643
2 parents ccac25e + 239cbbd commit c20217f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

miri

+4-1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ shift
7979
MIRIDIR=$(python3 -c 'import os, sys; print(os.path.dirname(os.path.realpath(sys.argv[1])))' "$0")
8080
# Used for rustc syncs.
8181
JOSH_FILTER=":at_commit=75dd959a3a40eb5b4574f8d2e23aa6efbeb33573[:prefix=src/tools/miri]:/src/tools/miri"
82+
# Needed for `./miri bench`.
83+
TOOLCHAIN=$(cd "$MIRIDIR"; rustup show active-toolchain | head -n 1 | cut -d ' ' -f 1)
8284

8385
## Early commands, that don't do auto-things and don't want the environment-altering things happening below.
8486
case "$COMMAND" in
@@ -189,6 +191,8 @@ if [ -z "$MIRI_AUTO_OPS" ]; then
189191
# other code has run.
190192
if [ -f "$MIRIDIR/.auto-everything" ] || [ -f "$MIRIDIR/.auto-toolchain" ] ; then
191193
$0 toolchain
194+
# Let's make sure to actually use that toolchain, too.
195+
TOOLCHAIN=miri
192196
fi
193197

194198
if [ -f "$MIRIDIR/.auto-everything" ] || [ -f "$MIRIDIR/.auto-fmt" ] ; then
@@ -202,7 +206,6 @@ fi
202206

203207
## Prepare the environment
204208
# Determine some toolchain properties
205-
TOOLCHAIN=$(cd "$MIRIDIR"; rustup show active-toolchain | head -n 1 | cut -d ' ' -f 1)
206209
TARGET=$(rustc +$TOOLCHAIN --version --verbose | grep "^host:" | cut -d ' ' -f 2)
207210
SYSROOT=$(rustc +$TOOLCHAIN --print sysroot)
208211
LIBDIR=$SYSROOT/lib/rustlib/$TARGET/lib

0 commit comments

Comments
 (0)