-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Disambiguate between rustc vs std having debug assertions in run-make-support
and run-make
tests
#143782
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Additionally, `NO_DEBUG_ASSERTIONS` is set by CI that threads through to the `./configure` script, which is somewhat fragile and "spooky action at a distance". Instead, use env vars controlled by compiletest, whose debug assertion info comes from bootstrap.
The test itself is still broken, but fix this gating separately first.
I believe this gate was wrong ever since the test was introduced, but it was very understandably easy to get wrong because |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aside from correcting the mistake in the one test, I think this approach will also help avoid confusion in the future. So r=me when CI is green.
PR CI is 📗 |
…Denton Disambiguate between rustc vs std having debug assertions in `run-make-support` and `run-make` tests `NO_DEBUG_ASSERTIONS` is set by CI that threads through to the `./configure.py` script, which is somewhat fragile and "spooky action at a distance". For `fmt-write-bloat`, this is actually wrong because the test wants to gate on *std* being built with debug assertions or not, whereas `NO_DEBUG_ASSERTIONS` determines *rustc* being built with debug assertions or not. Instead, use env vars controlled by compiletest, whose debug assertion info comes from bootstrap. https://github.com/rust-lang/rust/blob/855e0fe46e68d94e9f6147531b75ac2d488c548e/src/ci/run.sh#L137-L146 `NO_DEBUG_ASSERTIONS` controls `--enable-debug-assertions` https://github.com/rust-lang/rust/blob/855e0fe46e68d94e9f6147531b75ac2d488c548e/src/bootstrap/configure.py#L124 which sets `--rust.debug-assertions`, which controls *rustc* debug assertions. https://github.com/rust-lang/rust/blob/855e0fe46e68d94e9f6147531b75ac2d488c548e/src/bootstrap/configure.py#L125-L129 `--rust.debug-assertions-std` controls *std* debug assertions. Noticed while investigating `fmt-write-bloat` in rust-lang#143669 (comment). Best reviewed commit-by-commit. r? `@ChrisDenton` (or compiler/bootstrap)
NO_DEBUG_ASSERTIONS
is set by CI that threads through to the./configure.py
script, which is somewhat fragile and "spooky action at a distance". Forfmt-write-bloat
, this is actually wrong because the test wants to gate on std being built with debug assertions or not, whereasNO_DEBUG_ASSERTIONS
determines rustc being built with debug assertions or not. Instead, use env vars controlled by compiletest, whose debug assertion info comes from bootstrap.rust/src/ci/run.sh
Lines 137 to 146 in 855e0fe
NO_DEBUG_ASSERTIONS
controls--enable-debug-assertions
rust/src/bootstrap/configure.py
Line 124 in 855e0fe
which sets
--rust.debug-assertions
, which controls rustc debug assertions.rust/src/bootstrap/configure.py
Lines 125 to 129 in 855e0fe
--rust.debug-assertions-std
controls std debug assertions.Noticed while investigating
fmt-write-bloat
in #143669 (comment).Best reviewed commit-by-commit.
r? @ChrisDenton (or compiler/bootstrap)