[llvm] [BOLT][RUNTIME][NFC] Fix aarch64 match (PR #100866)
Peter Waller via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 5 02:13:07 PDT 2024
================
@@ -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)$")
----------------
peterwaller-arm wrote:
I'm not clear that this can ever be equal to 'armv*', do you have reason to believe it can be? Looking at the docs [0], and some discussion from [1], I conclude this could be equal to aarch64 or arm64 across the different platforms. That said I don't currently see the harm of somewhat generous matching here if you want to keep it or make it more broad. Maybe consider `^(arm|aarch64)` to allow various suffices maybe add a comment that it's intended to at least match armv8-a, armv9-a, arm64, aarch64, if it's believed to be necessary.
[0] https://cmake.org/cmake/help/latest/variable/CMAKE_HOST_SYSTEM_PROCESSOR.html
[1] https://stackoverflow.com/questions/70475665/what-are-the-possible-values-of-cmake-system-processor
https://github.com/llvm/llvm-project/pull/100866
More information about the llvm-commits
mailing list