Skip to content

Commit c677817

Browse files
committed
Install binaries to the miri toolchain's sysroot
1 parent 0ba1f4a commit c677817

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

ci.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ begingroup "Building Miri"
1717
echo "Installing release version of Miri"
1818
export RUSTFLAGS="-D warnings"
1919
export CARGO_INCREMENTAL=0
20+
ls -li ~/.cargo/bin/
2021
./miri install # implicitly locked
22+
ls -li ~/.cargo/bin/
23+
exit 1
2124

2225
# Prepare debug build for direct `./miri` invocations
2326
echo "Building debug version of Miri"
@@ -59,12 +62,11 @@ function run_tests {
5962
PYTHON=python
6063
fi
6164
# Some environment setup that attempts to confuse the heck out of cargo-miri.
62-
if [ "$HOST_TARGET" = x86_64-unknown-linux-gnu ]; then
65+
#if [ "$HOST_TARGET" = x86_64-unknown-linux-gnu ]; then
6366
# These act up on Windows (`which miri` produces a filename that does not exist?!?),
6467
# so let's do this only on Linux. Also makes sure things work without these set.
65-
export RUSTC=$(which rustc)
66-
export MIRI=$(which miri)
67-
fi
68+
#export RUSTC=$(which rustc) # Produces a warning unless we also set MIRI
69+
#fi
6870
mkdir -p .cargo
6971
echo 'build.rustc-wrapper = "thisdoesnotexist"' > .cargo/config.toml
7072
# Run the actual test

miri

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,10 @@ find_sysroot() {
281281
case "$COMMAND" in
282282
install)
283283
# "--locked" to respect the Cargo.lock file if it exists.
284-
$CARGO install $CARGO_EXTRA_FLAGS --path "$MIRIDIR" --force --locked "$@"
285-
$CARGO install $CARGO_EXTRA_FLAGS --path "$MIRIDIR"/cargo-miri --force --locked "$@"
284+
# Install binaries to the miri toolchain's sysroot so they do not interact with other toolchains
285+
echo Binaries should be installed to $SYSROOT
286+
$CARGO install $CARGO_EXTRA_FLAGS --path "$MIRIDIR" --force --locked --root "$SYSROOT" "$@"
287+
$CARGO install $CARGO_EXTRA_FLAGS --path "$MIRIDIR"/cargo-miri --force --locked --root "$SYSROOT" "$@"
286288
;;
287289
check)
288290
# Check, and let caller control flags.

0 commit comments

Comments
 (0)