Skip to content

Commit 61d8676

Browse files
authored
Merge pull request #320 from RalfJung/bootstrap
don't run build probes in rustc bootstrap
2 parents e471b2b + 663c663 commit 61d8676

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

build.rs

Lines changed: 8 additions & 0 deletions
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)