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 278e803

Browse files
committedNov 18, 2024
Auto merge of #131077 - lqd:debug-assertions-alt, r=<try>
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 bf6adec + 243d35c commit 278e803

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
@@ -131,6 +131,11 @@ if [ "$DEPLOY$DEPLOY_ALT" = "1" ]; then
131131

132132
CODEGEN_BACKENDS="${CODEGEN_BACKENDS:-llvm}"
133133
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.codegen-backends=$CODEGEN_BACKENDS"
134+
135+
# Unless explicitly disabled, we want rustc debug assertions on the -alt builds
136+
if [ "$DEPLOY_ALT" != "" ] && [ "$NO_DEBUG_ASSERTIONS" = "" ]; then
137+
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-debug-assertions"
138+
fi
134139
else
135140
# We almost always want debug assertions enabled, but sometimes this takes too
136141
# long for too little benefit, so we just turn them off.

0 commit comments

Comments
 (0)
Failed to load comments.