summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorChris Bieneman <beanz@apple.com>2016-02-26 21:21:40 +0000
committerChris Bieneman <beanz@apple.com>2016-02-26 21:21:40 +0000
commitbe22727598b68f101851bcba13d5433dcca0b7c0 (patch)
tree5b35cbe21d4625eedea3dd43919c3a300b5aa4b9 /llvm
parent1d412f6457e073e791858b30ab4006583e076a5b (diff)
downloadbcm5719-llvm-be22727598b68f101851bcba13d5433dcca0b7c0.tar.gz
bcm5719-llvm-be22727598b68f101851bcba13d5433dcca0b7c0.zip
[CMake] Allow LLVM_TARGETS_TO_BUILD to accept "Native"
This allows a user to specify "Native" as a target when configuring LLVM. Native will resolve to the LLVM_NATIVE_ARCH, which is the target that supports code generation for the host. llvm-svn: 262070
Diffstat (limited to 'llvm')
-rw-r--r--llvm/CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 3db1d275014..d0a32608de8 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -411,6 +411,10 @@ endif()
# first cmake run
include(config-ix)
+string(REPLACE "Native" ${LLVM_NATIVE_ARCH}
+ LLVM_TARGETS_TO_BUILD "${LLVM_TARGETS_TO_BUILD}")
+list(REMOVE_DUPLICATES LLVM_TARGETS_TO_BUILD)
+
# By default, we target the host, but this can be overridden at CMake
# invocation time.
set(LLVM_DEFAULT_TARGET_TRIPLE "${LLVM_HOST_TRIPLE}" CACHE STRING
OpenPOWER on IntegriCloud