From 0ebea159cb66c6b4b6fdccebfda1849fdecfb887 Mon Sep 17 00:00:00 2001 From: Zhou Qiankang Date: Wed, 22 Oct 2025 19:28:20 +0800 Subject: [PATCH] cmake: restrict GGML_CPU_ALL_VARIANTS to supported architectures The previous logic for enabling GGML_CPU_ALL_VARIANTS used a blacklist to exclude ARM processors. This caused builds to fail on other architectures not in the blacklist and not compatible with the option, such as loongarch64. This changes the condition to a whitelist, only enabling GGML_CPU_ALL_VARIANTS for x86 and PowerPC architectures. Signed-off-by: Zhou Qiankang --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 50a80629a..c31be04e2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,7 +28,7 @@ set(GGML_CUDA_FA ON) set(GGML_CUDA_COMPRESSION_MODE default) if((CMAKE_OSX_ARCHITECTURES AND NOT CMAKE_OSX_ARCHITECTURES MATCHES "arm64") - OR (NOT CMAKE_OSX_ARCHITECTURES AND NOT CMAKE_SYSTEM_PROCESSOR MATCHES "arm|aarch64|ARM64|ARMv[0-9]+")) + OR (NOT CMAKE_OSX_ARCHITECTURES AND CMAKE_SYSTEM_PROCESSOR MATCHES "(?i)x86_64|amd64|i[3-6]86|powerpc|ppc64")) set(GGML_CPU_ALL_VARIANTS ON) endif()