Skip to content

Commit fa63782

Browse files
committed
don't run build probes in rustc bootstrap
1 parent 2fd79cd commit fa63782

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

build.rs

+8
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@ fn main() {
4343
}
4444

4545
fn compile_probe() -> Option<ExitStatus> {
46+
if env::var_os("RUSTC_STAGE").is_some() {
47+
// We are running inside rustc bootstrap. This is a highly non-standard environment with
48+
// issues such as <https://github.com/rust-lang/cargo/issues/11138> and
49+
// <https://github.com/rust-lang/rust/issues/114839>. Let's just not use nightly features
50+
// here.
51+
return None;
52+
}
53+
4654
let rustc = env::var_os("RUSTC")?;
4755
let out_dir = env::var_os("OUT_DIR")?;
4856
let probefile = Path::new(&out_dir).join("probe.rs");

0 commit comments

Comments
 (0)