Skip to content

Add rust.debug-assertions-tools option #140438

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

Merged
merged 1 commit into from
Apr 30, 2025

Conversation

pietroalbini
Copy link
Member

Before this PR, the two only options to configure the presence of debug assertions were the rust.debug-assertions and rust.debug-assertions-std options. The former applied to everything, and the latter allowed to override the setting just for the standard library. This combination of settings doesn't allow to enable debug assertions for the std and the compiler but not tools.

Some tools (like Cargo) are not really meant to be executed with debug assertions enabled, and in Ferrocene we hit some debug assertions in it that are exclusively meant for its test suite. We'd thus like to enable debug assertions everywhere but in tools.

This PR adds a rust.debug-assertions-tools setting that does exactly this.

@rustbot
Copy link
Collaborator

rustbot commented Apr 29, 2025

r? @albertlarsan68

rustbot has assigned @albertlarsan68.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Apr 29, 2025
@rustbot
Copy link
Collaborator

rustbot commented Apr 29, 2025

This PR modifies src/bootstrap/src/core/config.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

This PR modifies bootstrap.example.toml.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

@Kobzol
Copy link
Contributor

Kobzol commented Apr 29, 2025

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Apr 29, 2025

📌 Commit 4fe94ba has been approved by Kobzol

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 29, 2025
@jieyouxu jieyouxu assigned Kobzol and unassigned albertlarsan68 Apr 29, 2025
tgross35 added a commit to tgross35/rust that referenced this pull request Apr 29, 2025
…s, r=Kobzol

Add `rust.debug-assertions-tools` option

Before this PR, the two only options to configure the presence of debug assertions were the `rust.debug-assertions` and `rust.debug-assertions-std` options. The former applied to everything, and the latter allowed to override the setting just for the standard library. This combination of settings doesn't allow to enable debug assertions for the std and the compiler but not tools.

Some tools (like Cargo) are not really meant to be executed with debug assertions enabled, and in Ferrocene we hit some debug assertions in it that are exclusively meant for its test suite. We'd thus like to enable debug assertions everywhere but in tools.

This PR adds a `rust.debug-assertions-tools` setting that does exactly this.
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 29, 2025
Rollup of 8 pull requests

Successful merges:

 - rust-lang#134232 (Share the naked asm impl between cg_ssa and cg_clif)
 - rust-lang#140312 (Improve pretty-printing of braces)
 - rust-lang#140437 (enable msa feature for mips in codegen tests)
 - rust-lang#140438 (Add `rust.debug-assertions-tools` option)
 - rust-lang#140439 (miri: algebraic intrinsics: bring back float non-determinism)
 - rust-lang#140445 (Treat ManuallyDrop as ~const Destruct)
 - rust-lang#140446 (chore: fix some tests)
 - rust-lang#140448 (Rename `rustc_query_append!` to `rustc_with_all_queries!`)

r? `@ghost`
`@rustbot` modify labels: rollup
ChrisDenton added a commit to ChrisDenton/rust that referenced this pull request Apr 30, 2025
…s, r=Kobzol

Add `rust.debug-assertions-tools` option

Before this PR, the two only options to configure the presence of debug assertions were the `rust.debug-assertions` and `rust.debug-assertions-std` options. The former applied to everything, and the latter allowed to override the setting just for the standard library. This combination of settings doesn't allow to enable debug assertions for the std and the compiler but not tools.

Some tools (like Cargo) are not really meant to be executed with debug assertions enabled, and in Ferrocene we hit some debug assertions in it that are exclusively meant for its test suite. We'd thus like to enable debug assertions everywhere but in tools.

This PR adds a `rust.debug-assertions-tools` setting that does exactly this.
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 30, 2025
…enton

Rollup of 9 pull requests

Successful merges:

 - rust-lang#139192 (mention provenance in the pointer::wrapping_offset docs)
 - rust-lang#140176 (Fix linking statics on Arm64EC)
 - rust-lang#140404 (rm `TypeVistable` impls for `Canonical`)
 - rust-lang#140437 (enable msa feature for mips in codegen tests)
 - rust-lang#140438 (Add `rust.debug-assertions-tools` option)
 - rust-lang#140446 (chore: fix some tests)
 - rust-lang#140470 (CI: rfl: move job forward to Linux v6.15-rc4)
 - rust-lang#140476 (chore: delete unused ui/auxiliary crates)
 - rust-lang#140481 (Require sanitizers be enabled for asan_odr_windows.rs)

r? `@ghost`
`@rustbot` modify labels: rollup
Zalathar added a commit to Zalathar/rust that referenced this pull request Apr 30, 2025
…s, r=Kobzol

Add `rust.debug-assertions-tools` option

Before this PR, the two only options to configure the presence of debug assertions were the `rust.debug-assertions` and `rust.debug-assertions-std` options. The former applied to everything, and the latter allowed to override the setting just for the standard library. This combination of settings doesn't allow to enable debug assertions for the std and the compiler but not tools.

Some tools (like Cargo) are not really meant to be executed with debug assertions enabled, and in Ferrocene we hit some debug assertions in it that are exclusively meant for its test suite. We'd thus like to enable debug assertions everywhere but in tools.

This PR adds a `rust.debug-assertions-tools` setting that does exactly this.
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 30, 2025
Rollup of 12 pull requests

Successful merges:

 - rust-lang#136160 (Remove backticks from `ShouldPanic::YesWithMessage`'s `TrFailedMsg`)
 - rust-lang#138087 (Initial implementation of `core_float_math`)
 - rust-lang#139059 (uses_power_alignment: wording tweaks)
 - rust-lang#139192 (mention provenance in the pointer::wrapping_offset docs)
 - rust-lang#140312 (Improve pretty-printing of braces)
 - rust-lang#140404 (rm `TypeVistable` impls for `Canonical`)
 - rust-lang#140437 (enable msa feature for mips in codegen tests)
 - rust-lang#140438 (Add `rust.debug-assertions-tools` option)
 - rust-lang#140439 (miri: algebraic intrinsics: bring back float non-determinism)
 - rust-lang#140445 (Treat ManuallyDrop as ~const Destruct)
 - rust-lang#140446 (chore: fix some tests)
 - rust-lang#140448 (Rename `rustc_query_append!` to `rustc_with_all_queries!`)

Failed merges:

 - rust-lang#140456 (Fix test simd/extract-insert-dyn on s390x)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 30, 2025
…iaskrgr

Rollup of 11 pull requests

Successful merges:

 - rust-lang#136160 (Remove backticks from `ShouldPanic::YesWithMessage`'s `TrFailedMsg`)
 - rust-lang#139059 (uses_power_alignment: wording tweaks)
 - rust-lang#139192 (mention provenance in the pointer::wrapping_offset docs)
 - rust-lang#140312 (Improve pretty-printing of braces)
 - rust-lang#140404 (rm `TypeVistable` impls for `Canonical`)
 - rust-lang#140437 (enable msa feature for mips in codegen tests)
 - rust-lang#140438 (Add `rust.debug-assertions-tools` option)
 - rust-lang#140439 (miri: algebraic intrinsics: bring back float non-determinism)
 - rust-lang#140445 (Treat ManuallyDrop as ~const Destruct)
 - rust-lang#140446 (chore: fix some tests)
 - rust-lang#140448 (Rename `rustc_query_append!` to `rustc_with_all_queries!`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 1267f0c into rust-lang:master Apr 30, 2025
6 checks passed
@rustbot rustbot added this to the 1.88.0 milestone Apr 30, 2025
@tshepang tshepang deleted the pa-debug-assertions-tools branch April 30, 2025 15:24
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Apr 30, 2025
Rollup merge of rust-lang#140438 - ferrocene:pa-debug-assertions-tools, r=Kobzol

Add `rust.debug-assertions-tools` option

Before this PR, the two only options to configure the presence of debug assertions were the `rust.debug-assertions` and `rust.debug-assertions-std` options. The former applied to everything, and the latter allowed to override the setting just for the standard library. This combination of settings doesn't allow to enable debug assertions for the std and the compiler but not tools.

Some tools (like Cargo) are not really meant to be executed with debug assertions enabled, and in Ferrocene we hit some debug assertions in it that are exclusively meant for its test suite. We'd thus like to enable debug assertions everywhere but in tools.

This PR adds a `rust.debug-assertions-tools` setting that does exactly this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants