forked from OSchip/llvm-project
Explicitly declare a library dependency of LLVM*Desc to
LLVM*AsmPrinter. GenLibDeps.pl fails to detect vtable references. As this is the only referenced symbol from LLVM*Desc to LLVM*AsmPrinter on optimized builds, the algorithm that creates the list of libraries to be linked into tools doesn't know about the dependency and sometimes places the libraries on the wrong order, yielding error messages like this: ../../lib/libLLVMARMDesc.a(ARMMCTargetDesc.cpp.o): In function `llvm::ARMInstPrinter::ARMInstPrinter(llvm::MCAsmInfo const&)': ARMMCTargetDesc.cpp:(.text._ZN4llvm14ARMInstPrinterC1ERKNS_9MCAsmInfoE [llvm::ARMInstPrinter::ARMInstPrinter(llvm::MCAsmInfo const&)]+0x2a): undefined reference to `vtable for llvm::ARMInstPrinter' llvm-svn: 136328
This commit is contained in:
parent
2d1e353966
commit
a8666a3cdb
|
@ -10,3 +10,5 @@ add_dependencies(LLVMARMDesc ARMCommonTableGen)
|
|||
|
||||
# Hack: we need to include 'main' target directory to grab private headers
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_BINARY_DIR}/..)
|
||||
|
||||
target_link_libraries(LLVMARMDesc LLVMARMAsmPrinter)
|
||||
|
|
|
@ -5,3 +5,5 @@ add_llvm_library(LLVMMBlazeDesc
|
|||
MBlazeMCTargetDesc.cpp
|
||||
)
|
||||
add_dependencies(LLVMMBlazeDesc MBlazeCommonTableGen)
|
||||
|
||||
target_link_libraries(LLVMMBlazeDesc LLVMMBlazeAsmPrinter)
|
||||
|
|
|
@ -3,3 +3,5 @@ add_llvm_library(LLVMMSP430Desc
|
|||
MSP430MCAsmInfo.cpp
|
||||
)
|
||||
add_dependencies(LLVMMSP430Desc MSP430CommonTableGen)
|
||||
|
||||
target_link_libraries(LLVMMSP430Desc LLVMMSP430AsmPrinter)
|
||||
|
|
|
@ -3,3 +3,5 @@ add_llvm_library(LLVMMipsDesc
|
|||
MipsMCAsmInfo.cpp
|
||||
)
|
||||
add_dependencies(LLVMMipsDesc MipsCommonTableGen)
|
||||
|
||||
target_link_libraries(LLVMMipsDesc LLVMMipsAsmPrinter)
|
||||
|
|
|
@ -6,3 +6,5 @@ add_llvm_library(LLVMPowerPCDesc
|
|||
PPCPredicates.cpp
|
||||
)
|
||||
add_dependencies(LLVMPowerPCDesc PowerPCCommonTableGen)
|
||||
|
||||
target_link_libraries(LLVMPowerPCDesc LLVMPowerPCAsmPrinter)
|
||||
|
|
|
@ -9,3 +9,5 @@ add_dependencies(LLVMX86Desc X86CommonTableGen)
|
|||
|
||||
# Hack: we need to include 'main' target directory to grab private headers
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_BINARY_DIR}/..)
|
||||
|
||||
target_link_libraries(LLVMX86Desc LLVMX86AsmPrinter)
|
||||
|
|
Loading…
Reference in New Issue