diff --git a/build.rs b/build.rs index a5dfd062..d71e72ed 100644 --- a/build.rs +++ b/build.rs @@ -240,6 +240,23 @@ fn build_neon_c_intrinsics() { } fn main() -> Result<(), Box> { + // As of Rust 1.80, unknown config names are warnings. Give Cargo of all our config names. + let all_cfgs = [ + "blake3_sse2_ffi", + "blake3_sse2_rust", + "blake3_sse41_ffi", + "blake3_sse41_rust", + "blake3_avx2_ffi", + "blake3_avx2_rust", + "blake3_avx512_ffi", + "blake3_neon", + ]; + for cfg_name in all_cfgs { + // TODO: Switch this whole file to the new :: syntax when our MSRV reaches 1.77. + // https://doc.rust-lang.org/cargo/reference/build-scripts.html#outputs-of-the-build-script + println!("cargo:rustc-check-cfg=cfg({cfg_name}, values(none()))"); + } + if is_pure() && is_neon() { panic!("It doesn't make sense to enable both \"pure\" and \"neon\"."); }