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:
parent
3b1eeabc49
commit
efc76af134
@ -57,3 +57,6 @@ default = ["stack-cache"]
|
|||||||
# Will be enabled on CI via `--all-features`.
|
# Will be enabled on CI via `--all-features`.
|
||||||
expensive-debug-assertions = []
|
expensive-debug-assertions = []
|
||||||
stack-cache = []
|
stack-cache = []
|
||||||
|
|
||||||
|
[profile.dev]
|
||||||
|
opt-level = 2 # because it's too slow otherwise
|
||||||
|
2
ci.sh
2
ci.sh
@ -3,7 +3,7 @@ set -euo pipefail
|
|||||||
set -x
|
set -x
|
||||||
|
|
||||||
# Determine configuration
|
# Determine configuration
|
||||||
export RUSTFLAGS="-D warnings"
|
export RUSTFLAGS="-D warnings -C debug-assertions -C debuginfo=1"
|
||||||
export CARGO_INCREMENTAL=0
|
export CARGO_INCREMENTAL=0
|
||||||
export CARGO_EXTRA_FLAGS="--all-features" # in particular, expensive-debug-assertions
|
export CARGO_EXTRA_FLAGS="--all-features" # in particular, expensive-debug-assertions
|
||||||
|
|
||||||
|
4
miri
4
miri
@ -108,9 +108,7 @@ if [ -z "$CARGO_TARGET_DIR" ]; then
|
|||||||
export CARGO_TARGET_DIR="$MIRIDIR/target"
|
export CARGO_TARGET_DIR="$MIRIDIR/target"
|
||||||
fi
|
fi
|
||||||
# We set the rpath so that Miri finds the private rustc libraries it needs.
|
# We set the rpath so that Miri finds the private rustc libraries it needs.
|
||||||
# We enable debug-assertions to get tracing.
|
export RUSTFLAGS="-C link-args=-Wl,-rpath,$LIBDIR $RUSTFLAGS"
|
||||||
# We enable line-only debuginfo for backtraces.
|
|
||||||
export RUSTFLAGS="-C link-args=-Wl,-rpath,$LIBDIR -C debug-assertions -C debuginfo=1 $RUSTFLAGS"
|
|
||||||
# Determine flags passed to all cargo invocations.
|
# Determine flags passed to all cargo invocations.
|
||||||
# This is a bit more annoying that one would hope due to
|
# This is a bit more annoying that one would hope due to
|
||||||
# <https://github.com/rust-lang/cargo/issues/6992>.
|
# <https://github.com/rust-lang/cargo/issues/6992>.
|
||||||
|
Loading…
Reference in New Issue
Block a user