summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorOscar Fuentes <ofv@wanadoo.es>2010-09-03 02:22:23 +0000
committerOscar Fuentes <ofv@wanadoo.es>2010-09-03 02:22:23 +0000
commite16dc06159d243bafc7b2e3362c0e3d929213d17 (patch)
tree825262b2c23a58094b4257b54eaf9f68302e2569 /llvm
parent96326e447cfc8d2ef6c40be732dfad947abf907d (diff)
downloadbcm5719-llvm-e16dc06159d243bafc7b2e3362c0e3d929213d17.tar.gz
bcm5719-llvm-e16dc06159d243bafc7b2e3362c0e3d929213d17.zip
Fix cmake build without native target selected.
The cmake (+ MSVC) build is broken if you don't select your native target. e.g. 'cmake -D LLVM_TARGETS_TO_BUILD="MyNonNativeTarget" .' This is because cmake currently sets the LLVM_NATIVE_* definitions regardless of whether the native target is selected (causing build errors). Patch by Mike Gist! llvm-svn: 112946
Diffstat (limited to 'llvm')
-rwxr-xr-xllvm/cmake/config-ix.cmake6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/cmake/config-ix.cmake b/llvm/cmake/config-ix.cmake
index 56e8d837366..f75e5dfb265 100755
--- a/llvm/cmake/config-ix.cmake
+++ b/llvm/cmake/config-ix.cmake
@@ -207,9 +207,6 @@ else ()
endif ()
if (LLVM_NATIVE_ARCH)
- set(LLVM_NATIVE_TARGET LLVMInitialize${LLVM_NATIVE_ARCH}Target)
- set(LLVM_NATIVE_TARGETINFO LLVMInitialize${LLVM_NATIVE_ARCH}TargetInfo)
- set(LLVM_NATIVE_ASMPRINTER LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter)
list(FIND LLVM_TARGETS_TO_BUILD ${LLVM_NATIVE_ARCH} NATIVE_ARCH_IDX)
if (NATIVE_ARCH_IDX EQUAL -1)
message(STATUS
@@ -217,6 +214,9 @@ if (LLVM_NATIVE_ARCH)
set(LLVM_NATIVE_ARCH)
else ()
message(STATUS "Native target architecture is ${LLVM_NATIVE_ARCH}")
+ set(LLVM_NATIVE_TARGET LLVMInitialize${LLVM_NATIVE_ARCH}Target)
+ set(LLVM_NATIVE_TARGETINFO LLVMInitialize${LLVM_NATIVE_ARCH}TargetInfo)
+ set(LLVM_NATIVE_ASMPRINTER LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter)
endif ()
endif()
OpenPOWER on IntegriCloud