Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit eb7e015

Browse files
committedOct 3, 2024
Auto merge of rust-lang#131077 - lqd:debug-assertions-alt, r=Kobzol
Enable debug assertions on alt builds Alt builds already have llvm assertions enabled, and this PR adds rustc's debug assertions. We've discussed that this would be useful a few times in the past, most recently in [this zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/cargo.20bisect-rustc'ing.20a.20debug.20assertions-only.20ICE), for example to bisect the source PR of an unexpected tripped debug assert, which is not that rare of an occurrence. [In another thread](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Alt.20builds.20with.20debug.20assertions) we discussed how it would help with Matthias' fuzzing workflow, and some of Ben's work. I don't _believe_ this needs an MCP, but am not sure. To my knowledge there are 2 alt builds (x64 linux, x64 msvc) and this enables it for both, though we could limit to x64 linux if we wanted to. try-job: dist-x86_64-linux-alt try-job: dist-x86_64-msvc-alt
2 parents f7c8928 + 243d35c commit eb7e015

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎src/ci/run.sh

+5
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,11 @@ if [ "$DEPLOY$DEPLOY_ALT" = "1" ]; then
127127

128128
CODEGEN_BACKENDS="${CODEGEN_BACKENDS:-llvm}"
129129
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.codegen-backends=$CODEGEN_BACKENDS"
130+
131+
# Unless explicitly disabled, we want rustc debug assertions on the -alt builds
132+
if [ "$DEPLOY_ALT" != "" ] && [ "$NO_DEBUG_ASSERTIONS" = "" ]; then
133+
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-debug-assertions"
134+
fi
130135
else
131136
# We almost always want debug assertions enabled, but sometimes this takes too
132137
# long for too little benefit, so we just turn them off.

0 commit comments

Comments
 (0)
Failed to load comments.