From 0c5fc0c7e141fad623c3770a954e5a7ae7178aaa Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Fri, 9 Dec 2011 03:31:58 +0000 Subject: [PATCH] Fix InitializeNativeTargetAsmParser in CMake builds by defining the appropriate macro. Patch by Alexey Prokhin. Fixes PR11498. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146239 91177308-0d34-0410-b5e6-96231b3b80d8 --- cmake/config-ix.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake index a5077002fea6..88eaa7401752 100755 --- a/cmake/config-ix.cmake +++ b/cmake/config-ix.cmake @@ -332,6 +332,11 @@ else () set(LLVM_NATIVE_TARGETINFO LLVMInitialize${LLVM_NATIVE_ARCH}TargetInfo) set(LLVM_NATIVE_TARGETMC LLVMInitialize${LLVM_NATIVE_ARCH}TargetMC) set(LLVM_NATIVE_ASMPRINTER LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter) + + # We don't have an ASM parser for all architectures yet. + if (EXISTS ${CMAKE_SOURCE_DIR}/lib/Target/${LLVM_NATIVE_ARCH}/AsmParser/CMakeLists.txt) + set(LLVM_NATIVE_ASMPARSER LLVMInitialize${LLVM_NATIVE_ARCH}AsmParser) + endif () endif () if( MINGW )