fix: override both rustc-unwrapped and rustc wrapper for symlink_file patch to propagate

This commit is contained in:
Oleks
2026-03-16 14:39:36 +02:00
parent 4b5e5eec2d
commit 0d46839c04
2 changed files with 20 additions and 6 deletions
+11
View File
@@ -0,0 +1,11 @@
--- a/src/bootstrap/src/lib.rs
+++ b/src/bootstrap/src/lib.rs
@@ -1990,7 +1990,7 @@ impl Build {
use std::os::unix::fs::symlink as symlink_file;
#[cfg(windows)]
use std::os::windows::fs::symlink_file;
- if !self.config.dry_run() { symlink_file(src.as_ref(), link.as_ref()) } else { Ok(()) }
+ if !self.config.dry_run() { let _ = std::fs::remove_file(link.as_ref()); symlink_file(src.as_ref(), link.as_ref()) } else { Ok(()) }
}
/// Returns if config.ninja is enabled, and checks for ninja existence,