[compiler-rt] r247094 - [CMake] Rename COMPILER_RT_TEST_TARGET_TRIPLE to more appropriate COMPILER_RT_DEFAULT_TARGET_TRIPLE.
Alexey Samsonov via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 8 15:48:35 PDT 2015
Author: samsonov
Date: Tue Sep 8 17:48:35 2015
New Revision: 247094
URL: http://llvm.org/viewvc/llvm-project?rev=247094&view=rev
Log:
[CMake] Rename COMPILER_RT_TEST_TARGET_TRIPLE to more appropriate COMPILER_RT_DEFAULT_TARGET_TRIPLE.
Modified:
compiler-rt/trunk/CMakeLists.txt
compiler-rt/trunk/cmake/config-ix.cmake
compiler-rt/trunk/test/lit.common.configured.in
Modified: compiler-rt/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/CMakeLists.txt?rev=247094&r1=247093&r2=247094&view=diff
==============================================================================
--- compiler-rt/trunk/CMakeLists.txt (original)
+++ compiler-rt/trunk/CMakeLists.txt Tue Sep 8 17:48:35 2015
@@ -132,22 +132,27 @@ else()
set(COMPILER_RT_TEST_COMPILER_ID GNU)
endif()
-# Tests using XFAIL use the first value in COMPILER_RT_TEST_TARGET_TRIPLE
-set(COMPILER_RT_TEST_TARGET_TRIPLE ${TARGET_TRIPLE} CACHE STRING
- "Default triple for cross-compiled executables")
-string(REPLACE "-" ";" TARGET_TRIPLE_LIST ${COMPILER_RT_TEST_TARGET_TRIPLE})
-list(GET TARGET_TRIPLE_LIST 0 COMPILER_RT_TEST_TARGET_ARCH)
-list(GET TARGET_TRIPLE_LIST 1 COMPILER_RT_TEST_TARGET_OS)
-list(GET TARGET_TRIPLE_LIST 2 COMPILER_RT_TEST_TARGET_ABI)
+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_TEST_TARGET_TRIPLE STREQUAL TARGET_TRIPLE)
- set(COMPILER_RT_HAS_EXPLICIT_TEST_TARGET_TRIPLE TRUE)
+if(NOT COMPILER_RT_DEFAULT_TARGET_TRIPLE STREQUAL TARGET_TRIPLE)
+ set(COMPILER_RT_HAS_EXPLICIT_DEFAULT_TARGET_TRIPLE TRUE)
else()
- set(COMPILER_RT_HAS_EXPLICIT_TEST_TARGET_TRIPLE FALSE)
+ set(COMPILER_RT_HAS_EXPLICIT_DEFAULT_TARGET_TRIPLE FALSE)
endif()
-if ("${COMPILER_RT_TEST_TARGET_ABI}" STREQUAL "androideabi")
+if ("${COMPILER_RT_DEFAULT_TARGET_ABI}" STREQUAL "androideabi")
set(ANDROID 1)
endif()
Modified: compiler-rt/trunk/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/config-ix.cmake?rev=247094&r1=247093&r2=247094&view=diff
==============================================================================
--- compiler-rt/trunk/cmake/config-ix.cmake (original)
+++ compiler-rt/trunk/cmake/config-ix.cmake Tue Sep 8 17:48:35 2015
@@ -121,8 +121,8 @@ macro(test_target_arch arch def)
endif()
if(${CAN_TARGET_${arch}})
list(APPEND COMPILER_RT_SUPPORTED_ARCH ${arch})
- elseif("${COMPILER_RT_TEST_TARGET_ARCH}" MATCHES "${arch}" AND
- COMPILER_RT_HAS_EXPLICIT_TEST_TARGET_TRIPLE)
+ elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "${arch}" AND
+ COMPILER_RT_HAS_EXPLICIT_DEFAULT_TARGET_TRIPLE)
# Bail out if we cannot target the architecture we plan to test.
message(FATAL_ERROR "Cannot compile for ${arch}:\n${TARGET_${arch}_OUTPUT}")
endif()
@@ -169,8 +169,7 @@ endif()
# Generate the COMPILER_RT_SUPPORTED_ARCH list.
if(ANDROID)
- # Can't rely on LLVM_NATIVE_ARCH in cross-compilation.
- # Examine compiler output instead.
+ # Examine compiler output to determine target architecture.
detect_target_arch()
set(COMPILER_RT_OS_SUFFIX "-android")
elseif(NOT APPLE) # Supported archs for Apple platforms are generated later
@@ -202,7 +201,7 @@ elseif(NOT APPLE) # Supported archs for
# clang's default CPU's. In the 64-bit case, we must also specify the ABI
# since the default ABI differs between gcc and clang.
# FIXME: Ideally, we would build the N32 library too.
- if("${COMPILER_RT_TEST_TARGET_ARCH}" MATCHES "mipsel|mips64el")
+ if("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "mipsel|mips64el")
# regex for mipsel, mips64el
test_target_arch(mipsel "" "-mips32r2" "--target=mipsel-linux-gnu")
test_target_arch(mips64el "" "-mips64r2" "-mabi=n64")
@@ -210,11 +209,11 @@ elseif(NOT APPLE) # Supported archs for
test_target_arch(mips "" "-mips32r2" "--target=mips-linux-gnu")
test_target_arch(mips64 "" "-mips64r2" "-mabi=n64")
endif()
- elseif("${COMPILER_RT_TEST_TARGET_ARCH}" MATCHES "arm")
+ elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "arm")
test_target_arch(arm "" "-march=armv7-a")
- elseif("${COMPILER_RT_TEST_TARGET_ARCH}" MATCHES "aarch32")
+ elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "aarch32")
test_target_arch(aarch32 "" "-march=armv8-a")
- elseif("${COMPILER_RT_TEST_TARGET_ARCH}" MATCHES "aarch64")
+ elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "aarch64")
test_target_arch(aarch64 "" "-march=armv8-a")
endif()
set(COMPILER_RT_OS_SUFFIX "")
Modified: compiler-rt/trunk/test/lit.common.configured.in
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/lit.common.configured.in?rev=247094&r1=247093&r2=247094&view=diff
==============================================================================
--- compiler-rt/trunk/test/lit.common.configured.in (original)
+++ compiler-rt/trunk/test/lit.common.configured.in Tue Sep 8 17:48:35 2015
@@ -5,12 +5,12 @@
def set_default(attr, value):
if not getattr(config, attr, None):
setattr(config, attr, value)
-
+
# Generic config options for all compiler-rt lit tests.
-set_default("target_triple", "@COMPILER_RT_TEST_TARGET_TRIPLE@")
+set_default("target_triple", "@COMPILER_RT_DEFAULT_TARGET_TRIPLE@")
set_default("target_cflags", "@COMPILER_RT_TEST_COMPILER_CFLAGS@")
set_default("host_arch", "@HOST_ARCH@")
-set_default("target_arch", "@COMPILER_RT_TEST_TARGET_ARCH@")
+set_default("target_arch", "@COMPILER_RT_DEFAULT_TARGET_ARCH@")
set_default("host_os", "@HOST_OS@")
set_default("llvm_build_mode", "@LLVM_BUILD_MODE@")
set_default("llvm_src_root", "@LLVM_SOURCE_DIR@")
More information about the llvm-commits
mailing list