Skip to content

Commit efc76af

Browse files
committed
don't forcefully enable debug assertions, but make -debug mode usable
still set those flags on CI though, we want to catch overflow there
1 parent 3b1eeab commit efc76af

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,6 @@ default = ["stack-cache"]
5757
# Will be enabled on CI via `--all-features`.
5858
expensive-debug-assertions = []
5959
stack-cache = []
60+
61+
[profile.dev]
62+
opt-level = 2 # because it's too slow otherwise

ci.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set -euo pipefail
33
set -x
44

55
# Determine configuration
6-
export RUSTFLAGS="-D warnings"
6+
export RUSTFLAGS="-D warnings -C debug-assertions -C debuginfo=1"
77
export CARGO_INCREMENTAL=0
88
export CARGO_EXTRA_FLAGS="--all-features" # in particular, expensive-debug-assertions
99

miri

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,7 @@ if [ -z "$CARGO_TARGET_DIR" ]; then
108108
export CARGO_TARGET_DIR="$MIRIDIR/target"
109109
fi
110110
# We set the rpath so that Miri finds the private rustc libraries it needs.
111-
# We enable debug-assertions to get tracing.
112-
# We enable line-only debuginfo for backtraces.
113-
export RUSTFLAGS="-C link-args=-Wl,-rpath,$LIBDIR -C debug-assertions -C debuginfo=1 $RUSTFLAGS"
111+
export RUSTFLAGS="-C link-args=-Wl,-rpath,$LIBDIR $RUSTFLAGS"
114112
# Determine flags passed to all cargo invocations.
115113
# This is a bit more annoying that one would hope due to
116114
# <https://github.com/rust-lang/cargo/issues/6992>.

0 commit comments

Comments
 (0)