From efc76af1342c55fde2f0bb316f126cd96558fc76 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 13 Jul 2022 19:22:22 -0400 Subject: [PATCH] don't forcefully enable debug assertions, but make -debug mode usable still set those flags on CI though, we want to catch overflow there --- Cargo.toml | 3 +++ ci.sh | 2 +- miri | 4 +--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index af73a7af31c..b6e1cdf5ca8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -57,3 +57,6 @@ default = ["stack-cache"] # Will be enabled on CI via `--all-features`. expensive-debug-assertions = [] stack-cache = [] + +[profile.dev] +opt-level = 2 # because it's too slow otherwise diff --git a/ci.sh b/ci.sh index e7c6ed833c6..05a3ee358ce 100755 --- a/ci.sh +++ b/ci.sh @@ -3,7 +3,7 @@ set -euo pipefail set -x # Determine configuration -export RUSTFLAGS="-D warnings" +export RUSTFLAGS="-D warnings -C debug-assertions -C debuginfo=1" export CARGO_INCREMENTAL=0 export CARGO_EXTRA_FLAGS="--all-features" # in particular, expensive-debug-assertions diff --git a/miri b/miri index f0d92b6a2b5..a1931485f69 100755 --- a/miri +++ b/miri @@ -108,9 +108,7 @@ if [ -z "$CARGO_TARGET_DIR" ]; then export CARGO_TARGET_DIR="$MIRIDIR/target" fi # We set the rpath so that Miri finds the private rustc libraries it needs. -# We enable debug-assertions to get tracing. -# We enable line-only debuginfo for backtraces. -export RUSTFLAGS="-C link-args=-Wl,-rpath,$LIBDIR -C debug-assertions -C debuginfo=1 $RUSTFLAGS" +export RUSTFLAGS="-C link-args=-Wl,-rpath,$LIBDIR $RUSTFLAGS" # Determine flags passed to all cargo invocations. # This is a bit more annoying that one would hope due to # .