Skip to content

Commit

Permalink
Auto merge of rust-lang#131077 - lqd:debug-assertions-alt, r=<try>
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bors committed Nov 17, 2024
2 parents 23e7ecb + 243d35c commit 0f54cc5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ if [ "$DEPLOY$DEPLOY_ALT" = "1" ]; then

CODEGEN_BACKENDS="${CODEGEN_BACKENDS:-llvm}"
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.codegen-backends=$CODEGEN_BACKENDS"

# Unless explicitly disabled, we want rustc debug assertions on the -alt builds
if [ "$DEPLOY_ALT" != "" ] && [ "$NO_DEBUG_ASSERTIONS" = "" ]; then
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-debug-assertions"
fi
else
# We almost always want debug assertions enabled, but sometimes this takes too
# long for too little benefit, so we just turn them off.
Expand Down

0 comments on commit 0f54cc5

Please sign in to comment.