cmake: add AOM_ARCH_AARCH64
This will allow identifying Windows Visual Studio targets as aarch64;
the Microsoft compiler does not define __aarch64__.
An alternative would be to define this in the code, checking for
_M_ARM64 or _M_ARM64EC. For now we'll use the existing AOM_ARCH_*
system. For compatibility AOM_ARCH_ARM will continue to be defined to 1
in this case.
This is similar to the change in libvpx:
33aba6ecc configure: add aarch64 to ARCH_LIST
Bug: b/277255390
Change-Id: I76075257ac0fda411294480280605a38f67448c7
diff --git a/build/cmake/aom_config_defaults.cmake b/build/cmake/aom_config_defaults.cmake
index d688e62..5058022 100644
--- a/build/cmake/aom_config_defaults.cmake
+++ b/build/cmake/aom_config_defaults.cmake
@@ -23,6 +23,7 @@
set_aom_detect_var(INLINE "" "Sets INLINE value for current target.")
# CPUs.
+set_aom_detect_var(AOM_ARCH_AARCH64 0 "Enables AArch64 architecture.")
set_aom_detect_var(AOM_ARCH_ARM 0 "Enables ARM architecture.")
set_aom_detect_var(AOM_ARCH_PPC 0 "Enables PPC architecture.")
set_aom_detect_var(AOM_ARCH_X86 0 "Enables X86 architecture.")
diff --git a/build/cmake/cpu.cmake b/build/cmake/cpu.cmake
index 730ad42..799a313 100644
--- a/build/cmake/cpu.cmake
+++ b/build/cmake/cpu.cmake
@@ -11,6 +11,9 @@
if("${AOM_TARGET_CPU}" MATCHES "^arm")
set(AOM_ARCH_ARM 1)
+ if("${AOM_TARGET_CPU}" STREQUAL "arm64")
+ set(AOM_ARCH_AARCH64 1)
+ endif()
set(RTCD_ARCH_ARM "yes")
if(ENABLE_NEON)