1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

[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 4103ca4c54
commit d8e8c23332

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