diff --git a/cmake/archdetect.cmake b/cmake/archdetect.cmake index 494269c2..2d64e5cf 100644 --- a/cmake/archdetect.cmake +++ b/cmake/archdetect.cmake @@ -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)