summaryrefslogtreecommitdiffstats
path: root/Modules/Platform/Android-Determine.cmake
diff options
context:
space:
mode:
authorHaibo Huang <hhb@google.com>2020-10-28 19:15:10 (GMT)
committerHaibo Huang <hhb@google.com>2020-11-06 03:45:09 (GMT)
commit85e5139abac3c3fc1aba2d796a4020e0a6e95115 (patch)
tree72040ae7ed9dbfc82d58ee363c7e4453b363061e /Modules/Platform/Android-Determine.cmake
parent622ac065d2abeb53de3548b7e4f3d9b5980dfa8d (diff)
downloadCMake-85e5139abac3c3fc1aba2d796a4020e0a6e95115.zip
CMake-85e5139abac3c3fc1aba2d796a4020e0a6e95115.tar.gz
CMake-85e5139abac3c3fc1aba2d796a4020e0a6e95115.tar.bz2
Android: Move *_LLVM_TRIPLE to the centralized table
This allows us to skip `abi-*.cmake` in the next change. In the future we may move all this information to the NDK.
Diffstat (limited to 'Modules/Platform/Android-Determine.cmake')
-rw-r--r--Modules/Platform/Android-Determine.cmake59
1 files changed, 35 insertions, 24 deletions
diff --git a/Modules/Platform/Android-Determine.cmake b/Modules/Platform/Android-Determine.cmake
index 3206c83..2c906ae 100644
--- a/Modules/Platform/Android-Determine.cmake
+++ b/Modules/Platform/Android-Determine.cmake
@@ -249,30 +249,38 @@ endif()
# https://developer.android.com/ndk/guides/abis.html
-set(_ANDROID_ABI_arm64-v8a_PROC "aarch64")
-set(_ANDROID_ABI_arm64-v8a_ARCH "arm64")
-set(_ANDROID_ABI_arm64-v8a_TRIPLE "aarch64-linux-android")
-set(_ANDROID_ABI_armeabi-v7a_PROC "armv7-a")
-set(_ANDROID_ABI_armeabi-v7a_ARCH "arm")
-set(_ANDROID_ABI_armeabi-v7a_TRIPLE "arm-linux-androideabi")
-set(_ANDROID_ABI_armeabi-v6_PROC "armv6")
-set(_ANDROID_ABI_armeabi-v6_ARCH "arm")
-set(_ANDROID_ABI_armeabi-v6_TRIPLE "arm-linux-androideabi")
-set(_ANDROID_ABI_armeabi_PROC "armv5te")
-set(_ANDROID_ABI_armeabi_ARCH "arm")
-set(_ANDROID_ABI_armeabi_TRIPLE "arm-linux-androideabi")
-set(_ANDROID_ABI_mips_PROC "mips")
-set(_ANDROID_ABI_mips_ARCH "mips")
-set(_ANDROID_ABI_mips_TRIPLE "mipsel-linux-android")
-set(_ANDROID_ABI_mips64_PROC "mips64")
-set(_ANDROID_ABI_mips64_ARCH "mips64")
-set(_ANDROID_ABI_mips64_TRIPLE "mips64el-linux-android")
-set(_ANDROID_ABI_x86_PROC "i686")
-set(_ANDROID_ABI_x86_ARCH "x86")
-set(_ANDROID_ABI_x86_TRIPLE "i686-linux-android")
-set(_ANDROID_ABI_x86_64_PROC "x86_64")
-set(_ANDROID_ABI_x86_64_ARCH "x86_64")
-set(_ANDROID_ABI_x86_64_TRIPLE "x86_64-linux-android")
+set(_ANDROID_ABI_arm64-v8a_PROC "aarch64")
+set(_ANDROID_ABI_arm64-v8a_ARCH "arm64")
+set(_ANDROID_ABI_arm64-v8a_TRIPLE "aarch64-linux-android")
+set(_ANDROID_ABI_arm64-v8a_LLVM_TRIPLE "aarch64-none-linux-android")
+set(_ANDROID_ABI_armeabi-v7a_PROC "armv7-a")
+set(_ANDROID_ABI_armeabi-v7a_ARCH "arm")
+set(_ANDROID_ABI_armeabi-v7a_TRIPLE "arm-linux-androideabi")
+set(_ANDROID_ABI_armeabi-v7a_LLVM_TRIPLE "armv7-none-linux-androideabi")
+set(_ANDROID_ABI_armeabi-v6_PROC "armv6")
+set(_ANDROID_ABI_armeabi-v6_ARCH "arm")
+set(_ANDROID_ABI_armeabi-v6_TRIPLE "arm-linux-androideabi")
+set(_ANDROID_ABI_armeabi-v6_LLVM_TRIPLE "armv6-none-linux-androideabi")
+set(_ANDROID_ABI_armeabi_PROC "armv5te")
+set(_ANDROID_ABI_armeabi_ARCH "arm")
+set(_ANDROID_ABI_armeabi_TRIPLE "arm-linux-androideabi")
+set(_ANDROID_ABI_armeabi_LLVM_TRIPLE "armv5te-none-linux-androideabi")
+set(_ANDROID_ABI_mips_PROC "mips")
+set(_ANDROID_ABI_mips_ARCH "mips")
+set(_ANDROID_ABI_mips_TRIPLE "mipsel-linux-android")
+set(_ANDROID_ABI_mips_LLVM_TRIPLE "mipsel-none-linux-android")
+set(_ANDROID_ABI_mips64_PROC "mips64")
+set(_ANDROID_ABI_mips64_ARCH "mips64")
+set(_ANDROID_ABI_mips64_TRIPLE "mips64el-linux-android")
+set(_ANDROID_ABI_mips64_LLVM_TRIPLE "mips64el-none-linux-android")
+set(_ANDROID_ABI_x86_PROC "i686")
+set(_ANDROID_ABI_x86_ARCH "x86")
+set(_ANDROID_ABI_x86_TRIPLE "i686-linux-android")
+set(_ANDROID_ABI_x86_LLVM_TRIPLE "i686-none-linux-android")
+set(_ANDROID_ABI_x86_64_PROC "x86_64")
+set(_ANDROID_ABI_x86_64_ARCH "x86_64")
+set(_ANDROID_ABI_x86_64_TRIPLE "x86_64-linux-android")
+set(_ANDROID_ABI_x86_64_LLVM_TRIPLE "x86_64-none-linux-android")
set(_ANDROID_PROC_aarch64_ARCH_ABI "arm64-v8a")
set(_ANDROID_PROC_armv7-a_ARCH_ABI "armeabi-v7a")
@@ -374,6 +382,8 @@ if(_ANDROID_SYSROOT_ARCH AND NOT "x${_ANDROID_SYSROOT_ARCH}" STREQUAL "x${CMAKE_
)
endif()
set(CMAKE_ANDROID_ARCH_TRIPLE "${_ANDROID_ABI_${CMAKE_ANDROID_ARCH_ABI}_TRIPLE}")
+set(CMAKE_ANDROID_ARCH_LLVM_TRIPLE
+ "${_ANDROID_ABI_${CMAKE_ANDROID_ARCH_ABI}_LLVM_TRIPLE}")
# Select a processor.
if(NOT CMAKE_SYSTEM_PROCESSOR)
@@ -488,6 +498,7 @@ set(CMAKE_ANDROID_ARCH_ABI \"${CMAKE_ANDROID_ARCH_ABI}\")
if(CMAKE_ANDROID_NDK)
string(APPEND CMAKE_SYSTEM_CUSTOM_CODE
"set(CMAKE_ANDROID_ARCH_TRIPLE \"${CMAKE_ANDROID_ARCH_TRIPLE}\")\n"
+ "set(CMAKE_ANDROID_ARCH_LLVM_TRIPLE \"${CMAKE_ANDROID_ARCH_LLVM_TRIPLE}\")\n"
"set(CMAKE_ANDROID_NDK_DEPRECATED_HEADERS \"${CMAKE_ANDROID_NDK_DEPRECATED_HEADERS}\")\n"
"set(CMAKE_ANDROID_NDK_TOOLCHAIN_HOST_TAG \"${CMAKE_ANDROID_NDK_TOOLCHAIN_HOST_TAG}\")\n"
"set(CMAKE_ANDROID_NDK_TOOLCHAIN_UNIFIED \"${CMAKE_ANDROID_NDK_TOOLCHAIN_UNIFIED}\")\n"