[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
This commit is contained in:
Chris Bieneman 2016-02-26 21:21:40 +00:00
parent 1d412f6457
commit be22727598
1 changed files with 4 additions and 0 deletions

View File

@ -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