]> git.lizzy.rs Git - rust.git/blobdiff - miri
add some dyn upcasting tests
[rust.git] / miri
diff --git a/miri b/miri
index 7b53b802db62a535db03580a69ca1b96e02c2e64..04d441b60780d959a167a3941723a9afcf816330 100755 (executable)
--- a/miri
+++ b/miri
@@ -96,10 +96,14 @@ fi
 
 # Prepare flags for cargo and rustc.
 CARGO="cargo +$TOOLCHAIN"
+# Share target dir between `miri` and `cargo-miri`.
 if [ -z "$CARGO_TARGET_DIR" ]; then
-    # Share target dir between `miri` and `cargo-miri`.
     export CARGO_TARGET_DIR="$MIRIDIR/target"
 fi
+# We configure dev builds to not be unusably slow.
+if [ -z "$CARGO_PROFILE_DEV_OPT_LEVEL" ]; then
+    export CARGO_PROFILE_DEV_OPT_LEVEL=2
+fi
 # We set the rpath so that Miri finds the private rustc libraries it needs.
 export RUSTFLAGS="-C link-args=-Wl,-rpath,$LIBDIR $RUSTFLAGS"
 
@@ -133,10 +137,9 @@ find_sysroot() {
 # Run command.
 case "$COMMAND" in
 install)
-    # "--locked" to respect the Cargo.lock file if it exists,
-    # "--offline" to avoid querying the registry (for yanked packages).
-    $CARGO install $CARGO_EXTRA_FLAGS --path "$MIRIDIR" --force --locked --offline "$@"
-    $CARGO install $CARGO_EXTRA_FLAGS --path "$MIRIDIR"/cargo-miri --force --locked --offline "$@"
+    # "--locked" to respect the Cargo.lock file if it exists.
+    $CARGO install $CARGO_EXTRA_FLAGS --path "$MIRIDIR" --force --locked "$@"
+    $CARGO install $CARGO_EXTRA_FLAGS --path "$MIRIDIR"/cargo-miri --force --locked "$@"
     ;;
 check)
     # Check, and let caller control flags.