From be22727598b68f101851bcba13d5433dcca0b7c0 Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Fri, 26 Feb 2016 21:21:40 +0000 Subject: [PATCH] [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 --- llvm/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt index 3db1d2750149..d0a32608de82 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