summaryrefslogtreecommitdiff
path: root/cmake/base-config-ix.cmake
diff options
context:
space:
mode:
authorPetr Hosek <phosek@chromium.org>2016-12-12 23:14:02 +0000
committerPetr Hosek <phosek@chromium.org>2016-12-12 23:14:02 +0000
commit330f9ef540a71caa022264b8254f795d472f7559 (patch)
tree5003773d253dc66e408c3b637f4232e13c8911aa /cmake/base-config-ix.cmake
parent955b8ec04bc04ceba3d2aeb750036ebb108ec421 (diff)
[compiler-rt] Support building builtins for a single target
This is used when building builtins for multiple targets as part of LLVM runtimes. Differential Revision: https://reviews.llvm.org/D26653 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@289489 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/base-config-ix.cmake')
-rw-r--r--cmake/base-config-ix.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmake/base-config-ix.cmake b/cmake/base-config-ix.cmake
index 97808674d..71d14992e 100644
--- a/cmake/base-config-ix.cmake
+++ b/cmake/base-config-ix.cmake
@@ -84,6 +84,8 @@ if(APPLE)
option(COMPILER_RT_ENABLE_IOS "Enable building for iOS" On)
option(COMPILER_RT_ENABLE_WATCHOS "Enable building for watchOS - Experimental" Off)
option(COMPILER_RT_ENABLE_TVOS "Enable building for tvOS - Experimental" Off)
+else()
+ option(COMPILER_RT_DEFAULT_TARGET_ONLY "Build builtins only for the default target" Off)
endif()
if(WIN32 AND NOT MINGW AND NOT CYGWIN)
@@ -127,7 +129,9 @@ macro(test_targets)
detect_target_arch()
set(COMPILER_RT_OS_SUFFIX "-android")
elseif(NOT APPLE) # Supported archs for Apple platforms are generated later
- if("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "i[2-6]86|x86|amd64")
+ if(COMPILER_RT_DEFAULT_TARGET_ONLY)
+ add_default_target_arch(${COMPILER_RT_DEFAULT_TARGET_ARCH})
+ elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "i[2-6]86|x86|amd64")
if(NOT MSVC)
test_target_arch(x86_64 "" "-m64")
# FIXME: We build runtimes for both i686 and i386, as "clang -m32" may