[llvm] r262070 - [CMake] Allow LLVM_TARGETS_TO_BUILD to accept "Native"

Chris Bieneman via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 26 13:21:40 PST 2016


Author: cbieneman
Date: Fri Feb 26 15:21:40 2016
New Revision: 262070

URL: http://llvm.org/viewvc/llvm-project?rev=262070&view=rev
Log:
[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.

Modified:
    llvm/trunk/CMakeLists.txt

Modified: llvm/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=262070&r1=262069&r2=262070&view=diff
==============================================================================
--- llvm/trunk/CMakeLists.txt (original)
+++ llvm/trunk/CMakeLists.txt Fri Feb 26 15:21:40 2016
@@ -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




More information about the llvm-commits mailing list