summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChris Bieneman <beanz@apple.com>2016-06-27 22:52:03 +0000
committerChris Bieneman <beanz@apple.com>2016-06-27 22:52:03 +0000
commit5619f196ea7f6325070005846ab2dc9d86baa696 (patch)
tree5b7c2042950b6a7ee2b333d2aa741213ce4358d5 /CMakeLists.txt
parentc95a1eab58119bd2e3962e6d3b184eef723270c4 (diff)
Revert "Parse the triple in base-config-ix to propagate ANDROID variable correctly"
This reverts commit r273914. This commit broke bots building compiler-rt using LLVM_BUILD_EXTERNAL_COMPILER_RT. See: http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_build/22221/console git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@273956 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 63958e3a3..000cc0d75 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -86,6 +86,18 @@ if (COMPILER_RT_STANDALONE_BUILD)
set(LLVM_LIT_ARGS "${LIT_ARGS_DEFAULT}" CACHE STRING "Default options for lit")
endif()
+set(COMPILER_RT_DEFAULT_TARGET_TRIPLE ${TARGET_TRIPLE} CACHE STRING
+ "Default triple for which compiler-rt runtimes will be built.")
+if(DEFINED COMPILER_RT_TEST_TARGET_TRIPLE)
+ # Backwards compatibility: this variable used to be called
+ # COMPILER_RT_TEST_TARGET_TRIPLE.
+ set(COMPILER_RT_DEFAULT_TARGET_TRIPLE ${COMPILER_RT_TEST_TARGET_TRIPLE})
+endif()
+
+string(REPLACE "-" ";" TARGET_TRIPLE_LIST ${COMPILER_RT_DEFAULT_TARGET_TRIPLE})
+list(GET TARGET_TRIPLE_LIST 0 COMPILER_RT_DEFAULT_TARGET_ARCH)
+list(GET TARGET_TRIPLE_LIST 1 COMPILER_RT_DEFAULT_TARGET_OS)
+list(GET TARGET_TRIPLE_LIST 2 COMPILER_RT_DEFAULT_TARGET_ABI)
# Determine if test target triple is specified explicitly, and doesn't match the
# default.
if(NOT COMPILER_RT_DEFAULT_TARGET_TRIPLE STREQUAL TARGET_TRIPLE)