diff options
| author | bors <bors@rust-lang.org> | 2022-11-02 07:44:31 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-11-02 07:44:31 +0000 |
| commit | 9d9157e333624ed748564fecbcc528f03210850f (patch) | |
| tree | 572ba6defc505e2af1dcbb53bccedf7cb7a5e69b | |
| parent | 02c5dedb605e8177bf6b72aea7cd994d33f3b768 (diff) | |
| parent | 95549078d7260dba327bf87cad38d9b87ba10a3a (diff) | |
| download | rust-9d9157e333624ed748564fecbcc528f03210850f.tar.gz rust-9d9157e333624ed748564fecbcc528f03210850f.zip | |
Auto merge of #2645 - RalfJung:miri-bench, r=RalfJung
fix ./miri bench Fixes https://github.com/rust-lang/miri/issues/2643
| -rwxr-xr-x | src/tools/miri/miri | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tools/miri/miri b/src/tools/miri/miri index a0593deb08a..f0986bfb1cd 100755 --- a/src/tools/miri/miri +++ b/src/tools/miri/miri @@ -79,6 +79,8 @@ shift MIRIDIR=$(python3 -c 'import os, sys; print(os.path.dirname(os.path.realpath(sys.argv[1])))' "$0") # Used for rustc syncs. JOSH_FILTER=":at_commit=75dd959a3a40eb5b4574f8d2e23aa6efbeb33573[:prefix=src/tools/miri]:/src/tools/miri" +# Needed for `./miri bench`. +TOOLCHAIN=$(cd "$MIRIDIR"; rustup show active-toolchain | head -n 1 | cut -d ' ' -f 1) ## Early commands, that don't do auto-things and don't want the environment-altering things happening below. case "$COMMAND" in @@ -189,6 +191,8 @@ if [ -z "$MIRI_AUTO_OPS" ]; then # other code has run. if [ -f "$MIRIDIR/.auto-everything" ] || [ -f "$MIRIDIR/.auto-toolchain" ] ; then $0 toolchain + # Let's make sure to actually use that toolchain, too. + TOOLCHAIN=miri fi if [ -f "$MIRIDIR/.auto-everything" ] || [ -f "$MIRIDIR/.auto-fmt" ] ; then @@ -202,7 +206,6 @@ fi ## Prepare the environment # Determine some toolchain properties -TOOLCHAIN=$(cd "$MIRIDIR"; rustup show active-toolchain | head -n 1 | cut -d ' ' -f 1) TARGET=$(rustc +$TOOLCHAIN --version --verbose | grep "^host:" | cut -d ' ' -f 2) SYSROOT=$(rustc +$TOOLCHAIN --print sysroot) LIBDIR=$SYSROOT/lib/rustlib/$TARGET/lib |
