From e310e2f0b925f24572b188eee18935767480517a Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Fri, 3 Jul 2020 11:18:44 +0200 Subject: [PATCH] set --target when building miri This helps cargo tell apart `./miri` builds and `cargo check` (e.g. through rust-analyzer). See https://github.com/rust-lang/cargo/issues/8440. --- miri | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/miri b/miri index 237a53efb1a..37e87ec7986 100755 --- a/miri +++ b/miri @@ -94,12 +94,12 @@ COMMAND="$1" # . case "$COMMAND" in *-debug) - CARGO_INSTALL_FLAGS="--debug $CARGO_EXTRA_FLAGS" - CARGO_BUILD_FLAGS="$CARGO_EXTRA_FLAGS" + CARGO_INSTALL_FLAGS="--target $TARGET --debug $CARGO_EXTRA_FLAGS" + CARGO_BUILD_FLAGS="--target $TARGET $CARGO_EXTRA_FLAGS" ;; *) - CARGO_INSTALL_FLAGS="$CARGO_EXTRA_FLAGS" - CARGO_BUILD_FLAGS="--release $CARGO_EXTRA_FLAGS" + CARGO_INSTALL_FLAGS="--target $TARGET $CARGO_EXTRA_FLAGS" + CARGO_BUILD_FLAGS="--target $TARGET --release $CARGO_EXTRA_FLAGS" ;; esac