@@ -7853,7 +7853,8 @@ AC_SUBST([LIBHACL_CFLAGS])
78537853
78547854# The SIMD files use aligned_alloc, which is not available on older versions of
78557855# Android.
7856- if test "$ac_sys_system" != "Linux-android" || test "$ANDROID_API_LEVEL" -ge 28; then
7856+ # The *mmintrin.h headers are x86-family-specific, so can't be used on WASI.
7857+ if test "$ac_sys_system" != "Linux-android" -a "$ac_sys_system" != "WASI" || test "$ANDROID_API_LEVEL" -ge 28; then
78577858 dnl This can be extended here to detect e.g. Power8, which HACL* should also support.
78587859 AX_CHECK_COMPILE_FLAG ( [ -msse -msse2 -msse3 -msse4.1 -msse4.2] ,[
78597860 [ LIBHACL_SIMD128_FLAGS="-msse -msse2 -msse3 -msse4.1 -msse4.2"]
@@ -7879,11 +7880,12 @@ AC_SUBST([LIBHACL_SIMD128_OBJS])
78797880
78807881# The SIMD files use aligned_alloc, which is not available on older versions of
78817882# Android.
7883+ # The *mmintrin.h headers are x86-family-specific, so can't be used on WASI.
78827884#
78837885# Although AVX support is not guaranteed on Android
78847886# (https://developer.android.com/ndk/guides/abis#86-64), this is safe because we do a
78857887# runtime CPUID check.
7886- if test "$ac_sys_system" != "Linux-android" || test "$ANDROID_API_LEVEL" -ge 28; then
7888+ if test "$ac_sys_system" != "Linux-android" -a "$ac_sys_system" != "WASI" || test "$ANDROID_API_LEVEL" -ge 28; then
78877889 AX_CHECK_COMPILE_FLAG ( [ -mavx2] ,[
78887890 [ LIBHACL_SIMD256_FLAGS="-mavx2"]
78897891 AC_DEFINE ( [ HACL_CAN_COMPILE_SIMD256] , [ 1] , [ HACL* library can compile SIMD256 implementations] )
0 commit comments