[llvm] [BOLT][RUNTIME][NFC] Fix aarch64 match (PR #100866)

Vladislav Khmelevsky via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 27 04:18:01 PDT 2024


https://github.com/yota9 created https://github.com/llvm/llvm-project/pull/100866

One of the problems related to #93151 is probably that aarch64 target
might have different names in different env, so extend aarch64 cmake cpu
match with different name aliases.


>From ac1c829f3cdea38df8b93ca0eded9128d6cec390 Mon Sep 17 00:00:00 2001
From: Vladislav Khmelevsky <och95 at yandex.ru>
Date: Sat, 27 Jul 2024 15:15:05 +0400
Subject: [PATCH] [BOLT][RUNTIME][NFC] Fix aarch64 match

One of the problems related to #93151 is probably that aarch64 target
might have different names in different env, so extend aarch64 cmake cpu
match with different name aliases.
---
 bolt/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bolt/CMakeLists.txt b/bolt/CMakeLists.txt
index 9f5875dd21284..426801ccd99af 100644
--- a/bolt/CMakeLists.txt
+++ b/bolt/CMakeLists.txt
@@ -82,7 +82,7 @@ endforeach()
 
 set(BOLT_ENABLE_RUNTIME_default OFF)
 if ((CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64"
-    OR CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
+    OR CMAKE_SYSTEM_PROCESSOR MATCHES "^(armv[8-9].*|arm64|aarch64)$")
     AND (CMAKE_SYSTEM_NAME STREQUAL "Linux"
       OR CMAKE_SYSTEM_NAME STREQUAL "Darwin")
     AND (NOT CMAKE_CROSSCOMPILING))



More information about the llvm-commits mailing list