Skip to content

Commit 3fcb995

Browse files
authored
Rollup merge of rust-lang#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!
2 parents 71c8e10 + 0e795a2 commit 3fcb995

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/bootstrap/sanity.rs

+13-2
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@
2121
use std::collections::HashMap;
2222
use std::env;
2323
use std::ffi::{OsString, OsStr};
24-
use std::fs;
25-
use std::process::Command;
24+
use std::fs::{self, File};
25+
use std::io::Read;
2626
use std::path::PathBuf;
27+
use std::process::Command;
2728

2829
use build_helper::output;
2930

@@ -234,4 +235,14 @@ $ pacman -R cmake && pacman -S mingw-w64-x86_64-cmake
234235
if let Some(ref s) = build.config.ccache {
235236
cmd_finder.must_have(s);
236237
}
238+
239+
if build.config.channel == "stable" {
240+
let mut stage0 = String::new();
241+
t!(t!(File::open(build.src.join("src/stage0.txt")))
242+
.read_to_string(&mut stage0));
243+
if stage0.contains("\ndev:") {
244+
panic!("bootstrapping from a dev compiler in a stable release, but \
245+
should only be bootstrapping from a released compiler!");
246+
}
247+
}
237248
}

0 commit comments

Comments
 (0)