From ce5d897eb62f85db5b0821428323bb2e2673443c Mon Sep 17 00:00:00 2001 From: Albert Larsan <74931857+albertlarsan68@users.noreply.github.com> Date: Tue, 18 Apr 2023 07:00:51 +0000 Subject: [PATCH] Fix bootstrap locking Fix the regression introduced in 108607 --- src/bootstrap/bin/main.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/bootstrap/bin/main.rs b/src/bootstrap/bin/main.rs index 912d875e445ea..a80379e85c193 100644 --- a/src/bootstrap/bin/main.rs +++ b/src/bootstrap/bin/main.rs @@ -15,10 +15,12 @@ fn main() { let args = env::args().skip(1).collect::>(); let config = Config::parse(&args); + #[cfg(all(any(unix, windows), not(target_os = "solaris")))] + let mut build_lock; + #[cfg(all(any(unix, windows), not(target_os = "solaris")))] + let _build_lock_guard; #[cfg(all(any(unix, windows), not(target_os = "solaris")))] { - let mut build_lock; - let _build_lock_guard; let path = config.out.join("lock"); build_lock = fd_lock::RwLock::new(t!(std::fs::File::create(&path))); _build_lock_guard = match build_lock.try_write() {