From 959f275f09b39d9e99bde1e717cb07423c616e56 Mon Sep 17 00:00:00 2001 From: DmitriyMusatkin Date: Fri, 6 Sep 2024 10:28:45 -0700 Subject: [PATCH] lets try this --- cmake/AwsSIMD.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmake/AwsSIMD.cmake b/cmake/AwsSIMD.cmake index 65fce96c7..753e53397 100644 --- a/cmake/AwsSIMD.cmake +++ b/cmake/AwsSIMD.cmake @@ -18,7 +18,13 @@ else() set(AWS_AVX512vL_FLAG "-mavx512vl") set(AWS_CLMUL_FLAG "-mpclmul") set(AWS_SSE4_2_FLAG "-msse4.2") - set(AWS_ARMv8_1_FLAG "-march=armv8-a+crc+crypto -mtune=neoverse-v1") + + check_c_compiler_flag("-mtune=neoverse-v1" HAVE_MTUNE_NEOVERSE_V1) + if (HAVE_MTUNE_NEOVERSE_V1) + set(AWS_ARMv8_1_FLAG "-march=armv8-a+crc+crypto -mtune=neoverse-v1") + else() + set(AWS_ARMv8_1_FLAG "-march=armv8-a+crc+crypto") + endif() set(WERROR_FLAG "-Werror") endif()