about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-01-05 17:22:13 +0800
committerGitHub <noreply@github.com>2018-01-05 17:22:13 +0800
commit3fcb99575962660be1989e7176dd36444f6fa41b (patch)
treec77ea210e9d64e5e93e4460daffa6629d0e21bf7 /src
parent71c8e106e3b5cd8bea807e57d86c1de49aed6260 (diff)
parent0e795a210604993e5a30c97e75104c016f107509 (diff)
downloadrust-3fcb99575962660be1989e7176dd36444f6fa41b.tar.gz
rust-3fcb99575962660be1989e7176dd36444f6fa41b.zip
Rollup merge of #47199 - alexcrichton:stable-no-dev, r=kennytm
rustbuild: Don't allow stable bootstrap from dev

I forgot to update the bootstrap compiler for the 1.23.0 release so let's make
sure it doesn't happen again!
Diffstat (limited to 'src')
-rw-r--r--src/bootstrap/sanity.rs15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
index bc275b7fc74..a8b43ad3c30 100644
--- a/src/bootstrap/sanity.rs
+++ b/src/bootstrap/sanity.rs
@@ -21,9 +21,10 @@
 use std::collections::HashMap;
 use std::env;
 use std::ffi::{OsString, OsStr};
-use std::fs;
-use std::process::Command;
+use std::fs::{self, File};
+use std::io::Read;
 use std::path::PathBuf;
+use std::process::Command;
 
 use build_helper::output;
 
@@ -234,4 +235,14 @@ $ pacman -R cmake && pacman -S mingw-w64-x86_64-cmake
     if let Some(ref s) = build.config.ccache {
         cmd_finder.must_have(s);
     }
+
+    if build.config.channel == "stable" {
+        let mut stage0 = String::new();
+        t!(t!(File::open(build.src.join("src/stage0.txt")))
+            .read_to_string(&mut stage0));
+        if stage0.contains("\ndev:") {
+            panic!("bootstrapping from a dev compiler in a stable release, but \
+                    should only be bootstrapping from a released compiler!");
+        }
+    }
 }