about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/bootstrap/lib.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
index d44b96cfb99..522b3b7e851 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
@@ -1431,6 +1431,13 @@ impl Build {
             return Vec::new();
         }
 
+        if !stamp.exists() {
+            eprintln!(
+                "Warning: Unable to find the stamp file, did you try to keep a nonexistent build stage?"
+            );
+            crate::detail_exit(1);
+        }
+
         let mut paths = Vec::new();
         let contents = t!(fs::read(stamp), &stamp);
         // This is the method we use for extracting paths from the stamp file passed to us. See