From a8fe542dfed9e9bed2933950326cef41ba77bcc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Rakic?= Date: Mon, 30 Sep 2024 16:13:44 +0000 Subject: [PATCH 1/3] tmp: make builds fail with debug-assertions enabled making sure it's enabled on CI --- compiler/rustc/src/main.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compiler/rustc/src/main.rs b/compiler/rustc/src/main.rs index e9a7397557eb1..347a004d227e2 100644 --- a/compiler/rustc/src/main.rs +++ b/compiler/rustc/src/main.rs @@ -36,6 +36,9 @@ // for an example of how to do so. fn main() { + #[cfg(debug_assertions)] + compile_error!("debug assertions are indeed enabled"); + // See the comment at the top of this file for an explanation of this. #[cfg(feature = "jemalloc")] { From 928a727a1fceccef5a5a308f0474062bf59591e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Rakic?= Date: Mon, 30 Sep 2024 16:15:28 +0000 Subject: [PATCH 2/3] tmp: enable tests on try builds --- src/ci/github-actions/jobs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ci/github-actions/jobs.yml b/src/ci/github-actions/jobs.yml index 6379f1ade1ce8..94eb47c03931f 100644 --- a/src/ci/github-actions/jobs.yml +++ b/src/ci/github-actions/jobs.yml @@ -72,7 +72,7 @@ envs: # - not running `opt-dist`'s post-optimization smoke tests on the resulting toolchain # # If you *want* these to happen however, temporarily uncomment it before triggering a try build. - DIST_TRY_BUILD: 1 + # DIST_TRY_BUILD: 1 auto: <<: *production From 93e7a369be9f674cfb514df8451559c15e2b3725 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Rakic?= Date: Mon, 30 Sep 2024 16:17:50 +0000 Subject: [PATCH 3/3] enable rustc debug assertions on -alt builds just like llvm assertions --- src/ci/run.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ci/run.sh b/src/ci/run.sh index c8201d9bcfd27..9aaf4b50c42de 100755 --- a/src/ci/run.sh +++ b/src/ci/run.sh @@ -127,6 +127,13 @@ 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" != "" ]; then + if [ "$NO_DEBUG_ASSERTIONS" = "" ]; then + RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-debug-assertions" + fi + 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.