Skip to content

Commit 1f02cdf

Browse files
authored
Merge pull request #248 from RalfJung/bootstrap
don't run build probes in rustc bootstrap
2 parents 2fd79cd + fa63782 commit 1f02cdf

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

build.rs

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