diff options
| author | bors <bors@rust-lang.org> | 2024-11-08 03:32:51 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-11-08 03:32:51 +0000 |
| commit | 78bb5ee79e0261e8e47476b631da02acc1cb03ef (patch) | |
| tree | 0a4c7d02d444cd7dbf030fd01c63257f0748cbb4 /src/bootstrap | |
| parent | 5b20c459997590eda4d324b53cdc55439a56265d (diff) | |
| parent | 97dbab9124ff8ecaf4ced5720996e67e51fc62ea (diff) | |
Auto merge of #132756 - workingjubilee:rollup-bed2akn, r=workingjubilee
Rollup of 10 pull requests
Successful merges:
- #130586 (Set "symbol name" in raw-dylib import libraries to the decorated name)
- #131913 (Add `{ignore,needs}-{rustc,std}-debug-assertions` directive support)
- #132095 (Fix #131977 parens mangled in shared mut static lint suggestion)
- #132131 ([StableMIR] API to retrieve definitions from crates)
- #132639 (core: move intrinsics.rs into intrinsics folder)
- #132696 (Compile `test_num_f128` conditionally on `reliable_f128_math` config)
- #132737 (bootstrap: Print better message if lock pid isn't available)
- #132739 (Fix `librustdoc/scrape_examples.rs` formatting)
- #132740 (Update test for LLVM 20's new vector splat syntax)
- #132741 (Update mips64 data layout to match LLVM 20 change)
r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/src/bin/main.rs | 8 | ||||
| -rw-r--r-- | src/bootstrap/src/core/build_steps/test.rs | 10 | ||||
| -rw-r--r-- | src/bootstrap/src/core/builder/cargo.rs | 4 | ||||
| -rw-r--r-- | src/bootstrap/src/core/config/config.rs | 33 |
4 files changed, 32 insertions, 23 deletions
diff --git a/src/bootstrap/src/bin/main.rs b/src/bootstrap/src/bin/main.rs index e9ec79e417b..409a644b9be 100644 --- a/src/bootstrap/src/bin/main.rs +++ b/src/bootstrap/src/bin/main.rs @@ -33,7 +33,7 @@ fn main() { // Display PID of process holding the lock // PID will be stored in a lock file let lock_path = config.out.join("lock"); - let pid = fs::read_to_string(&lock_path).unwrap_or_default(); + let pid = fs::read_to_string(&lock_path); build_lock = fd_lock::RwLock::new(t!(fs::OpenOptions::new() .write(true) @@ -47,7 +47,11 @@ fn main() { } err => { drop(err); - println!("WARNING: build directory locked by process {pid}, waiting for lock"); + if let Ok(pid) = pid { + println!("WARNING: build directory locked by process {pid}, waiting for lock"); + } else { + println!("WARNING: build directory locked, waiting for lock"); + } let mut lock = t!(build_lock.write()); t!(lock.write(process::id().to_string().as_ref())); lock diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs index bcce2748c2e..2c36d8bab82 100644 --- a/src/bootstrap/src/core/build_steps/test.rs +++ b/src/bootstrap/src/core/build_steps/test.rs @@ -1938,9 +1938,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 c3d0994f164..134da5db96d 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 8115aea033d..f977c285a74 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<u32>, pub rust_codegen_units_std: Option<u32>, - 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<bool> = "debug", codegen_units: Option<u32> = "codegen-units", codegen_units_std: Option<u32> = "codegen-units-std", - debug_assertions: Option<bool> = "debug-assertions", + rustc_debug_assertions: Option<bool> = "debug-assertions", randomize_layout: Option<bool> = "randomize-layout", - debug_assertions_std: Option<bool> = "debug-assertions-std", + std_debug_assertions: Option<bool> = "debug-assertions-std", overflow_checks: Option<bool> = "overflow-checks", overflow_checks_std: Option<bool> = "overflow-checks-std", debug_logging: Option<bool> = "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: _, |
