From 8079caab598feef390f1f012f1373219adf315ca Mon Sep 17 00:00:00 2001 From: Manjusaka Date: Mon, 2 Jun 2025 23:13:26 +0800 Subject: [PATCH] gh-135032: Disable the SIMD128/SIMD256 for Linux arm64 explictly Signed-off-by: Manjusaka --- Modules/blake2module.c | 6 +++--- Modules/hmacmodule.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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