@@ -7853,7 +7853,8 @@ AC_SUBST([LIBHACL_CFLAGS])
7853
7853
7854
7854
# The SIMD files use aligned_alloc, which is not available on older versions of
7855
7855
# 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
7857
7858
dnl This can be extended here to detect e.g. Power8, which HACL* should also support.
7858
7859
AX_CHECK_COMPILE_FLAG ( [ -msse -msse2 -msse3 -msse4.1 -msse4.2] ,[
7859
7860
[ LIBHACL_SIMD128_FLAGS="-msse -msse2 -msse3 -msse4.1 -msse4.2"]
@@ -7879,11 +7880,12 @@ AC_SUBST([LIBHACL_SIMD128_OBJS])
7879
7880
7880
7881
# The SIMD files use aligned_alloc, which is not available on older versions of
7881
7882
# Android.
7883
+ # The *mmintrin.h headers are x86-family-specific, so can't be used on WASI.
7882
7884
#
7883
7885
# Although AVX support is not guaranteed on Android
7884
7886
# (https://developer.android.com/ndk/guides/abis#86-64), this is safe because we do a
7885
7887
# 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
7887
7889
AX_CHECK_COMPILE_FLAG ( [ -mavx2] ,[
7888
7890
[ LIBHACL_SIMD256_FLAGS="-mavx2"]
7889
7891
AC_DEFINE ( [ HACL_CAN_COMPILE_SIMD256] , [ 1] , [ HACL* library can compile SIMD256 implementations] )
0 commit comments