about summary refs log tree commit diff
diff options
context:
space:
mode:
-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 {