diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs index 2ad1b39a87c83..4aced4f1e3211 100644 --- a/src/bootstrap/src/core/build_steps/test.rs +++ b/src/bootstrap/src/core/build_steps/test.rs @@ -1933,9 +1933,13 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the cmd.arg("--json"); - if builder.config.rust_debug_assertions_std { - cmd.arg("--with-debug-assertions"); - }; + if builder.config.rustc_debug_assertions { + cmd.arg("--with-rustc-debug-assertions"); + } + + if builder.config.std_debug_assertions { + cmd.arg("--with-std-debug-assertions"); + } let mut llvm_components_passed = false; let mut copts_passed = false; diff --git a/src/bootstrap/src/core/builder/cargo.rs b/src/bootstrap/src/core/builder/cargo.rs index c3d0994f16410..134da5db96d06 100644 --- a/src/bootstrap/src/core/builder/cargo.rs +++ b/src/bootstrap/src/core/builder/cargo.rs @@ -833,9 +833,9 @@ impl Builder<'_> { cargo.env( profile_var("DEBUG_ASSERTIONS"), if mode == Mode::Std { - self.config.rust_debug_assertions_std.to_string() + self.config.std_debug_assertions.to_string() } else { - self.config.rust_debug_assertions.to_string() + self.config.rustc_debug_assertions.to_string() }, ); cargo.env( diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs index 8115aea033d93..f977c285a74c1 100644 --- a/src/bootstrap/src/core/config/config.rs +++ b/src/bootstrap/src/core/config/config.rs @@ -263,8 +263,10 @@ pub struct Config { pub rust_optimize: RustOptimize, pub rust_codegen_units: Option, pub rust_codegen_units_std: Option, - pub rust_debug_assertions: bool, - pub rust_debug_assertions_std: bool, + + pub rustc_debug_assertions: bool, + pub std_debug_assertions: bool, + pub rust_overflow_checks: bool, pub rust_overflow_checks_std: bool, pub rust_debug_logging: bool, @@ -1115,9 +1117,9 @@ define_config! { debug: Option = "debug", codegen_units: Option = "codegen-units", codegen_units_std: Option = "codegen-units-std", - debug_assertions: Option = "debug-assertions", + rustc_debug_assertions: Option = "debug-assertions", randomize_layout: Option = "randomize-layout", - debug_assertions_std: Option = "debug-assertions-std", + std_debug_assertions: Option = "debug-assertions-std", overflow_checks: Option = "overflow-checks", overflow_checks_std: Option = "overflow-checks-std", debug_logging: Option = "debug-logging", @@ -1652,8 +1654,8 @@ impl Config { let mut llvm_offload = None; let mut llvm_plugins = None; let mut debug = None; - let mut debug_assertions = None; - let mut debug_assertions_std = None; + let mut rustc_debug_assertions = None; + let mut std_debug_assertions = None; let mut overflow_checks = None; let mut overflow_checks_std = None; let mut debug_logging = None; @@ -1675,8 +1677,8 @@ impl Config { debug: debug_toml, codegen_units, codegen_units_std, - debug_assertions: debug_assertions_toml, - debug_assertions_std: debug_assertions_std_toml, + rustc_debug_assertions: rustc_debug_assertions_toml, + std_debug_assertions: std_debug_assertions_toml, overflow_checks: overflow_checks_toml, overflow_checks_std: overflow_checks_std_toml, debug_logging: debug_logging_toml, @@ -1734,8 +1736,8 @@ impl Config { config.download_ci_rustc_commit(download_rustc, config.llvm_assertions); debug = debug_toml; - debug_assertions = debug_assertions_toml; - debug_assertions_std = debug_assertions_std_toml; + rustc_debug_assertions = rustc_debug_assertions_toml; + std_debug_assertions = std_debug_assertions_toml; overflow_checks = overflow_checks_toml; overflow_checks_std = overflow_checks_std_toml; debug_logging = debug_logging_toml; @@ -2148,14 +2150,13 @@ impl Config { config.rust_std_features = std_features.unwrap_or(default_std_features); let default = debug == Some(true); - config.rust_debug_assertions = debug_assertions.unwrap_or(default); - config.rust_debug_assertions_std = - debug_assertions_std.unwrap_or(config.rust_debug_assertions); + config.rustc_debug_assertions = rustc_debug_assertions.unwrap_or(default); + config.std_debug_assertions = std_debug_assertions.unwrap_or(config.rustc_debug_assertions); config.rust_overflow_checks = overflow_checks.unwrap_or(default); config.rust_overflow_checks_std = overflow_checks_std.unwrap_or(config.rust_overflow_checks); - config.rust_debug_logging = debug_logging.unwrap_or(config.rust_debug_assertions); + config.rust_debug_logging = debug_logging.unwrap_or(config.rustc_debug_assertions); let with_defaults = |debuginfo_level_specific: Option<_>| { debuginfo_level_specific.or(debuginfo_level).unwrap_or(if debug == Some(true) { @@ -3075,8 +3076,8 @@ fn check_incompatible_options_for_ci_rustc( debug: _, codegen_units: _, codegen_units_std: _, - debug_assertions: _, - debug_assertions_std: _, + rustc_debug_assertions: _, + std_debug_assertions: _, overflow_checks: _, overflow_checks_std: _, debuginfo_level: _,