diff --git a/Modules/blake2module.c b/Modules/blake2module.c index 07aa89f573f05f..b89585a34c9fb8 100644 --- a/Modules/blake2module.c +++ b/Modules/blake2module.c @@ -41,12 +41,12 @@ #include -// SIMD256 can't be compiled on macOS ARM64, and performance of SIMD128 isn't +// SIMD256 can't be compiled on macOS and Linux ARM64, and performance of SIMD128 isn't // great; but when compiling a universal2 binary, autoconf will set // HACL_CAN_COMPILE_SIMD128 and HACL_CAN_COMPILE_SIMD256 because they *can* be -// compiled on x86_64. If we're on macOS ARM64, disable these preprocessor +// compiled on x86_64. If we're on macOS and Linux ARM6, disable these preprocessor // symbols. -#if defined(__APPLE__) && defined(__arm64__) +#if (defined(__APPLE__) || defined(__linux__)) && defined(__arm64__) # undef HACL_CAN_COMPILE_SIMD128 # undef HACL_CAN_COMPILE_SIMD256 #endif diff --git a/Modules/hmacmodule.c b/Modules/hmacmodule.c index c7b49d4dee3d0a..47bf52a67add64 100644 --- a/Modules/hmacmodule.c +++ b/Modules/hmacmodule.c @@ -30,7 +30,7 @@ # include #endif -#if defined(__APPLE__) && defined(__arm64__) +#if (defined(__APPLE__) || defined(__linux__)) && defined(__arm64__) # undef HACL_CAN_COMPILE_SIMD128 # undef HACL_CAN_COMPILE_SIMD256 #endif