--- a/lib/x86/adler32_impl.h +++ b/lib/x86/adler32_impl.h @@ -40,6 +40,7 @@ # define USE_AVX512 0 # include "adler32_template.h" +# ifndef LIBDEFLATE_DISABLE_SIMD_ABOVE_SSE2 # define adler32_x86_avx2 adler32_x86_avx2 # define SUFFIX _avx2 # define ATTRIBUTES _target_attribute("avx2") @@ -47,6 +48,7 @@ # define USE_VNNI 0 # define USE_AVX512 0 # include "adler32_template.h" +# endif /* !LIBDEFLATE_DISABLE_SIMD_ABOVE_SSE2 */ #endif /* @@ -61,7 +63,8 @@ * configure step, so checking the binutils version is not always an option.) */ #if (GCC_PREREQ(12, 1) || CLANG_PREREQ(12, 0, 13000000) || MSVC_PREREQ(1930)) && \ - !defined(LIBDEFLATE_ASSEMBLER_DOES_NOT_SUPPORT_AVX_VNNI) + !defined(LIBDEFLATE_ASSEMBLER_DOES_NOT_SUPPORT_AVX_VNNI) && \ + !defined(LIBDEFLATE_DISABLE_SIMD_ABOVE_SSE2) # define adler32_x86_avx2_vnni adler32_x86_avx2_vnni # define SUFFIX _avx2_vnni # define ATTRIBUTES _target_attribute("avx2,avxvnni")