llvm.org GIT mirror llvm / e1967a7
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! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112946 91177308-0d34-0410-b5e6-96231b3b80d8 Oscar Fuentes 9 years ago
1 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
206206 endif ()
207207
208208 if (LLVM_NATIVE_ARCH)
209 set(LLVM_NATIVE_TARGET LLVMInitialize${LLVM_NATIVE_ARCH}Target)
210 set(LLVM_NATIVE_TARGETINFO LLVMInitialize${LLVM_NATIVE_ARCH}TargetInfo)
211 set(LLVM_NATIVE_ASMPRINTER LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter)
212209 list(FIND LLVM_TARGETS_TO_BUILD ${LLVM_NATIVE_ARCH} NATIVE_ARCH_IDX)
213210 if (NATIVE_ARCH_IDX EQUAL -1)
214211 message(STATUS
216213 set(LLVM_NATIVE_ARCH)
217214 else ()
218215 message(STATUS "Native target architecture is ${LLVM_NATIVE_ARCH}")
216 set(LLVM_NATIVE_TARGET LLVMInitialize${LLVM_NATIVE_ARCH}Target)
217 set(LLVM_NATIVE_TARGETINFO LLVMInitialize${LLVM_NATIVE_ARCH}TargetInfo)
218 set(LLVM_NATIVE_ASMPRINTER LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter)
219219 endif ()
220220 endif()
221221