fix arch=native on arm+clang

This commit is contained in:
Konstantinos Margaritis 2023-12-20 15:15:38 +00:00
parent 1b915cfb93
commit 2aa5e1c710

View File

@ -68,8 +68,23 @@ if (USE_CPU_NATIVE)
endif()
else()
if (SIMDE_BACKEND)
set(GNUCC_ARCH native)
set(TUNE_FLAG native)
if (CMAKE_COMPILER_IS_CLANG)
if(ARCH_AARCH64)
if (CMAKE_C_COMPILER_VERSION VERSION_LESS "15.0")
set(GNUCC_ARCH native)
set(TUNE_FLAG native)
else()
set(GNUCC_ARCH armv8-a)
set(TUNE_FLAG generic)
endif()
else()
set(GNUCC_ARCH native)
set(TUNE_FLAG native)
endif()
else()
set(GNUCC_ARCH native)
set(TUNE_FLAG native)
endif()
elseif (ARCH_IA32 OR ARCH_X86_64)
set(GNUCC_ARCH native)
set(TUNE_FLAG generic)