From d472ce190ce99b4ade6ed90295b3702608334f8e Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Wed, 2 Sep 2026 18:25:19 -0700 Subject: [PATCH] CMake: Always enable crc32 This effectively raises our minspec to ARMv8.0-a + crc. --- CMakeLists.txt | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f6ce4bb4..87b7c311d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -485,12 +485,20 @@ endif() set(FEX_TUNE_COMPILE_FLAGS) if (NOT TUNE_ARCH STREQUAL "generic") - check_cxx_compiler_flag("-march=${TUNE_ARCH}" COMPILER_SUPPORTS_ARCH_TYPE) - if(COMPILER_SUPPORTS_ARCH_TYPE) - list(APPEND FEX_TUNE_COMPILE_FLAGS "-march=${TUNE_ARCH}") - else() - message(FATAL_ERROR "Trying to compile arch type '${TUNE_ARCH}' but the compiler doesn't support this") + set(TUNE_ARCH_STRING "${TUNE_ARCH}") + if(ARCHITECTURE_arm64) + set(TUNE_ARCH_STRING "${TUNE_ARCH}+crc") endif() + check_cxx_compiler_flag("-march=${TUNE_ARCH_STRING}" COMPILER_SUPPORTS_ARCH_TYPE) + if(COMPILER_SUPPORTS_ARCH_TYPE) + list(APPEND FEX_TUNE_COMPILE_FLAGS "-march=${TUNE_ARCH_STRING}") + else() + message(FATAL_ERROR "Trying to compile arch type '${TUNE_ARCH_STRING}' but the compiler doesn't support this") + endif() +elseif(ARCHITECTURE_arm64) + # Need to always append crc + check_cxx_compiler_flag("-march=armv8-a+crc" COMPILER_SUPPORTS_ARCH_TYPE) + list(APPEND FEX_TUNE_COMPILE_FLAGS "-march=armv8-a+crc") endif() if (TUNE_CPU STREQUAL "native")