about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRyan Levick <me@ryanlevick.com>2021-02-16 10:35:15 +0100
committerRyan Levick <me@ryanlevick.com>2021-02-16 11:17:00 +0100
commitf52caa76f9204b1341b59adad3d6323f4ca35292 (patch)
tree5046c419ab5c8cb752267dfe5620feb292c6bb0d
parent090dac0c3892a2d21afb0f82aa72920760e08078 (diff)
downloadrust-f52caa76f9204b1341b59adad3d6323f4ca35292.tar.gz
rust-f52caa76f9204b1341b59adad3d6323f4ca35292.zip
Do not delete bootstrap.exe on Windows during clean
Windows does not allow deleting currently running executables
-rw-r--r--src/bootstrap/clean.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bootstrap/clean.rs b/src/bootstrap/clean.rs
index 9b9df36e7dc..6026a000c30 100644
--- a/src/bootstrap/clean.rs
+++ b/src/bootstrap/clean.rs
@@ -21,6 +21,9 @@ pub fn clean(build: &Build, all: bool) {
     } else {
         rm_rf(&build.out.join("tmp"));
         rm_rf(&build.out.join("dist"));
+        // Only delete the bootstrap executable on non-Windows systems
+        // Windows does not allow deleting a currently running executable
+        #[cfg(not(windows))]
         rm_rf(&build.out.join("bootstrap"));
 
         for host in &build.hosts {