From fe845a169e4589278d5bc0817ac90b5251677a3e Mon Sep 17 00:00:00 2001 From: Cody Tapscott Date: Fri, 9 Oct 2026 08:55:59 -0400 Subject: [PATCH] cmake: fix the Darwin-only gating of VORTEXM4 for DYNAMIC_ARCH 55a10c748 ("Make VortexM4 available in DYNAMIC_ARCH on MacOS only") meant to restrict VORTEXM4 to clang on Darwin, matching 5133aac05 for the Makefile build and 6f225daf9 for dynamic_arm64.c. But it put the check in the GNU branch, where the compiler can never match "Clang", and left the clang branch adding VORTEXM4 on every non-Windows system. Move the Darwin check to the clang branch, replacing its non-Windows one. On other systems dynamic_arm64.c aliases gotoblas_VORTEXM4 to NEOVERSEN1, so the VORTEXM4 kernels there were built but never used. Darwin itself is unaffected: the Darwin/iOS block below resets DYNAMIC_CORE and adds VORTEXM4 on its own. Co-Authored-By: Claude Opus 5.5 --- cmake/arch.cmake | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cmake/arch.cmake b/cmake/arch.cmake index 12d7de54e7..0509dee70c 100644 --- a/cmake/arch.cmake +++ b/cmake/arch.cmake @@ -40,9 +40,6 @@ if (DYNAMIC_ARCH) endif () if (${CMAKE_C_COMPILER_VERSION} VERSION_GREATER_EQUAL 14) # SME ACLE supported in GCC >= 14 set(DYNAMIC_CORE ${DYNAMIC_CORE} ARMV9SME) - endif() - if (${CMAKE_C_COMPILER_ID} MATCHES "Clang" AND ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") - set(DYNAMIC_CORE ${DYNAMIC_CORE} VORTEXM4) endif() elseif (${CMAKE_C_COMPILER_ID} MATCHES "Clang") if (${CMAKE_C_COMPILER_VERSION} VERSION_GREATER_EQUAL 11) # SVE ACLE supported in LLVM >= 11 @@ -52,7 +49,7 @@ if (DYNAMIC_ARCH) set(DYNAMIC_CORE ${DYNAMIC_CORE} ARMV9SME) endif() - if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows") + if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") if (${CMAKE_C_COMPILER_VERSION} VERSION_GREATER_EQUAL 19 OR (${CMAKE_C_COMPILER_ID} MATCHES AppleClang AND ${CMAKE_C_COMPILER_VERSION} VERSION_GREATER_EQUAL 17) ) # SME w/out SVE supported in LLVM >= 19 and AppleClang >= 17 set(DYNAMIC_CORE ${DYNAMIC_CORE} VORTEXM4) endif()