From 509d5efe2b202730cf8d5675a94dd96e912e76df Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Mon, 6 May 2024 12:39:15 +0000 Subject: [PATCH] Silence unexpected-cfgs --- library/stdarch/crates/assert-instr-macro/build.rs | 1 + library/stdarch/crates/core_arch/build.rs | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 library/stdarch/crates/core_arch/build.rs diff --git a/library/stdarch/crates/assert-instr-macro/build.rs b/library/stdarch/crates/assert-instr-macro/build.rs index 01ae79660ed2..e02205f3b4ff 100644 --- a/library/stdarch/crates/assert-instr-macro/build.rs +++ b/library/stdarch/crates/assert-instr-macro/build.rs @@ -2,6 +2,7 @@ use std::env; fn main() { println!("cargo:rerun-if-changed=build.rs"); + println!("cargo::rustc-check-cfg=cfg(optimized)"); let opt_level = env::var("OPT_LEVEL") .ok() .and_then(|s| s.parse().ok()) diff --git a/library/stdarch/crates/core_arch/build.rs b/library/stdarch/crates/core_arch/build.rs new file mode 100644 index 000000000000..fdd68f83b8dc --- /dev/null +++ b/library/stdarch/crates/core_arch/build.rs @@ -0,0 +1,3 @@ +fn main() { + println!("cargo::rustc-check-cfg=cfg(stdarch_intel_sde)"); +}