Merge pull request #5793 from martin-frbg/issue5775

Reduce the default list of DYNAMIC_ARCH targets for ARM64-based Apple systems
This commit is contained in:
Martin Kroeker
2026-05-04 09:04:58 +02:00
committed by GitHub
3 changed files with 48 additions and 1 deletions

View File

@@ -738,6 +738,20 @@ DYNAMIC_CORE += THUNDERX2T99
DYNAMIC_CORE += TSV110
DYNAMIC_CORE += EMAG8180
DYNAMIC_CORE += THUNDERX3T110
ifeq ($(OSNAME), Darwin)
DYNAMIC_CORE = ARMV8
DYNAMIC_CORE += NEOVERSEN1
ifneq ($(NO_SME), 1)
DYNAMIC_CORE += ARMV9SME
ifeq ($(OSNAME), Darwin)
ifneq ($(C_COMPILER), GCC)
DYNAMIC_CORE += VORTEXM4
endif
endif
endif
endif
ifdef DYNAMIC_LIST
override DYNAMIC_CORE = ARMV8 $(DYNAMIC_LIST)
XCCOMMON_OPT = -DDYNAMIC_LIST -DDYN_ARMV8

View File

@@ -54,6 +54,14 @@ if (DYNAMIC_ARCH)
endif()
endif()
endif ()
if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" OR ${CMAKE_SYSTEM_NAME} STREQUAL "iOS")
set(DYNAMIC_CORE ARMV8 NEOVERSEN1)
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 ACLE supported in LLVM >= 19 and AppleClang >= 17
set(DYNAMIC_CORE ${DYNAMIC_CORE} ARMV9SME VORTEXM4)
endif()
endif()
if (DYNAMIC_LIST)
set(DYNAMIC_CORE ARMV8 ${DYNAMIC_LIST})
endif ()

View File

@@ -151,19 +151,39 @@ extern gotoblas_t gotoblas_A64FX;
#else
#define gotoblas_A64FX gotoblas_ARMV8
#endif
#else //not a user-specified dynamic_list
#ifdef OS_DARWIN
#define gotoblas_CORTEXA53 gotoblas_ARMV8
#else
extern gotoblas_t gotoblas_CORTEXA53;
#endif
#define gotoblas_CORTEXA55 gotoblas_CORTEXA53
#ifdef OS_DARWIN
#define gotoblas_CORTEXA57 gotoblas_ARMV8
#else
extern gotoblas_t gotoblas_CORTEXA57;
#endif
#define gotoblas_CORTEXA72 gotoblas_CORTEXA57
#define gotoblas_CORTEXA73 gotoblas_CORTEXA57
#define gotoblas_FALKOR gotoblas_CORTEXA57
#ifdef OS_DARWIN
#define gotoblas_THUNDERX gotoblas_ARMV8
#define gotoblas_THUNDERX2T99 gotoblas_ARMV8
#define gotoblas_THUNDERX3T110 gotoblas_ARMV8
#define gotoblas_TSV110 gotoblas_ARMV8
#define gotoblas_EMAG8180 gotoblas_ARMV8
#else
extern gotoblas_t gotoblas_THUNDERX;
extern gotoblas_t gotoblas_THUNDERX2T99;
extern gotoblas_t gotoblas_THUNDERX3T110;
extern gotoblas_t gotoblas_TSV110;
extern gotoblas_t gotoblas_EMAG8180;
#endif
extern gotoblas_t gotoblas_NEOVERSEN1;
#define gotoblas_VORTEX gotoblas_NEOVERSEN1
#ifndef OS_DARWIN
#ifndef NO_SVE
extern gotoblas_t gotoblas_NEOVERSEV1;
extern gotoblas_t gotoblas_NEOVERSEN2;
@@ -175,6 +195,12 @@ extern gotoblas_t gotoblas_A64FX;
#define gotoblas_ARMV8SVE gotoblas_ARMV8
#define gotoblas_A64FX gotoblas_ARMV8
#endif
#else
#define gotoblas_NEOVERSEV1 gotoblas_ARMV8
#define gotoblas_NEOVERSEN2 gotoblas_ARMV8
#define gotoblas_ARMV8SVE gotoblas_ARMV8
#define gotoblas_A64FX gotoblas_ARMV8
#endif
#ifndef NO_SME
extern gotoblas_t gotoblas_ARMV9SME;
#if defined (__clang__) && defined(OS_DARWIN)
@@ -191,7 +217,6 @@ extern gotoblas_t gotoblas_VORTEXM4;
#define gotoblas_VORTEXM4 gotoblas_NEOVERSEN1
#endif
extern gotoblas_t gotoblas_THUNDERX3T110;
#endif
#define gotoblas_NEOVERSEV2 gotoblas_NEOVERSEN2