Rework AVX/AVX2 detection again

This commit is contained in:
Michael Vines
2021-10-09 15:57:17 -07:00
parent 8cf222b8bd
commit c16510152e
3 changed files with 71 additions and 70 deletions

11
perf/build.rs Normal file
View File

@ -0,0 +1,11 @@
fn main() {
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
{
if is_x86_feature_detected!("avx") {
println!("cargo:rustc-cfg=build_target_feature_avx");
}
if is_x86_feature_detected!("avx2") {
println!("cargo:rustc-cfg=build_target_feature_avx2");
}
}
}