don't forcefully enable debug assertions, but make -debug mode usable

still set those flags on CI though, we want to catch overflow there
This commit is contained in:
Ralf Jung 2022-07-13 19:22:22 -04:00
parent 3b1eeabc49
commit efc76af134
3 changed files with 5 additions and 4 deletions

View File

@ -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

2
ci.sh
View File

@ -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

4
miri
View File

@ -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
# <https://github.com/rust-lang/cargo/issues/6992>.