about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlbert Larsan <74931857+albertlarsan68@users.noreply.github.com>2023-04-18 07:00:51 +0000
committerAlbert Larsan <74931857+albertlarsan68@users.noreply.github.com>2023-04-18 07:00:51 +0000
commitce5d897eb62f85db5b0821428323bb2e2673443c (patch)
treeef37474e82f147e6acec6531d7722bd2e1a92889
parent386025117a6b7cd9e7f7c96946793db2ec8aa24c (diff)
downloadrust-ce5d897eb62f85db5b0821428323bb2e2673443c.tar.gz
rust-ce5d897eb62f85db5b0821428323bb2e2673443c.zip
Fix bootstrap locking
Fix the regression introduced in 108607
-rw-r--r--src/bootstrap/bin/main.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bootstrap/bin/main.rs b/src/bootstrap/bin/main.rs
index 912d875e445..a80379e85c1 100644
--- a/src/bootstrap/bin/main.rs
+++ b/src/bootstrap/bin/main.rs
@@ -16,9 +16,11 @@ fn main() {
     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() {