From d04ea0ff1921fcf4f4bf1dc6f088b29471c34f95 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Tue, 27 Sep 2022 11:16:09 +0200 Subject: [PATCH] Allow passing rustix_use_libc cfg using RUSTFLAGS Before this would error with ``` error: unexpected `rustix_use_libc` as condition name | = note: `-D unexpected-cfgs` implied by `-D warnings` = help: was set with `--cfg` but isn't in the `--check-cfg` expected names ``` I'm setting rustix_use_libc when testing bootstrapping rustc with cg_clif as I'm disabling inline asm here. --- src/bootstrap/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index c83490316b6..b20d43a3332 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -229,6 +229,8 @@ const EXTRA_CHECK_CFGS: &[(Option, &'static str, Option<&[&'static str]>)] // FIXME: Used by proc-macro2, but we should not be triggering on external dependencies. (Some(Mode::Rustc), "span_locations", None), (Some(Mode::ToolRustc), "span_locations", None), + // Can be passed in RUSTFLAGS to prevent direct syscalls in rustix. + (None, "rustix_use_libc", None), ]; /// A structure representing a Rust compiler.