From 663c6633e39d194bed0048df1e8ea5b60ef00e73 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 15 Aug 2023 09:44:47 +0200 Subject: [PATCH] don't run build probes in rustc bootstrap --- build.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/build.rs b/build.rs index de94535..8456a7d 100644 --- a/build.rs +++ b/build.rs @@ -68,6 +68,14 @@ fn main() { } fn compile_probe() -> Option { + 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 and + // . 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");