]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
fix arch=native on arm+clang
authorKonstantinos Margaritis <konma@vectorcamp.gr>
Wed, 20 Dec 2023 15:15:38 +0000 (15:15 +0000)
committerKonstantinos Margaritis <konma@vectorcamp.gr>
Wed, 20 Dec 2023 15:15:38 +0000 (15:15 +0000)
cmake/archdetect.cmake

index 494269c2999ee498c6fbaef404191356ab894343..2d64e5cf0430fb6479c8f156fc9c281af8199f62 100644 (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)