Fix bootstrap locking

Fix the regression introduced in 108607
This commit is contained in:
Albert Larsan 2023-04-18 07:00:51 +00:00
parent 386025117a
commit ce5d897eb6
No known key found for this signature in database
GPG Key ID: 92709B88BB8F13EA
1 changed files with 4 additions and 2 deletions

View File

@ -15,10 +15,12 @@ fn main() {
let args = env::args().skip(1).collect::<Vec<_>>();
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() {