Skip to content

Commit 663c663

Browse files
committed
don't run build probes in rustc bootstrap
1 parent e471b2b commit 663c663

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
@@ -68,6 +68,14 @@ fn main() {
6868
}
6969

7070
fn compile_probe() -> Option<ExitStatus> {
71+
if env::var_os("RUSTC_STAGE").is_some() {
72+
// We are running inside rustc bootstrap. This is a highly non-standard environment with
73+
// issues such as <https://github.com/rust-lang/cargo/issues/11138> and
74+
// <https://github.com/rust-lang/rust/issues/114839>. Let's just not use nightly features
75+
// here.
76+
return None;
77+
}
78+
7179
let rustc = env::var_os("RUSTC")?;
7280
let out_dir = env::var_os("OUT_DIR")?;
7381
let probefile = Path::new(&out_dir).join("probe.rs");

0 commit comments

Comments
 (0)