check if on x86 arch before doing feature detection

This commit is contained in:
Anton-4 2022-08-12 14:07:16 +02:00
parent 72e60bceea
commit d98db0828b
No known key found for this signature in database
GPG key ID: A13F4A6E21141925

View file

@ -138,6 +138,7 @@ mod cli_run {
) { ) {
// valgrind does not yet support avx512 instructions, see #1963. // valgrind does not yet support avx512 instructions, see #1963.
// we can't enable this only when testing with valgrind because of host re-use between tests // we can't enable this only when testing with valgrind because of host re-use between tests
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
if is_x86_feature_detected!("avx512f") { if is_x86_feature_detected!("avx512f") {
std::env::set_var("NO_AVX512", "1"); std::env::set_var("NO_AVX512", "1");
} }