Skip to content

Commit

Permalink
add check-cfg directives in build.rs to silence nightly warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
oconnor663 committed Jun 1, 2024
1 parent 0816bad commit b9e5df1
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,21 @@ fn build_neon_c_intrinsics() {
}

fn main() -> Result<(), Box<dyn std::error::Error>> {
// 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 {
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\".");
}
Expand Down

0 comments on commit b9e5df1

Please sign in to comment.