Skip to content

Commit

Permalink
don't run build probes in rustc bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Aug 15, 2023
1 parent 2fd79cd commit fa63782
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions build.rs
Expand Up @@ -43,6 +43,14 @@ fn main() {
}

fn compile_probe() -> Option<ExitStatus> {
if env::var_os("RUSTC_STAGE").is_some() {
// We are running inside rustc bootstrap. This is a highly non-standard environment with
// issues such as <https://github.com/rust-lang/cargo/issues/11138> and
// <https://github.com/rust-lang/rust/issues/114839>. Let's just not use nightly features
// here.
return None;
}

let rustc = env::var_os("RUSTC")?;
let out_dir = env::var_os("OUT_DIR")?;
let probefile = Path::new(&out_dir).join("probe.rs");
Expand Down

0 comments on commit fa63782

Please sign in to comment.