arrowdodger
2011-Mar-09 12:18 UTC
[LLVMdev] Discrepancies between bin/llvm-config --libs and LLVM_LINK_COMPONENTS in CMake.
Hello. When i run llvm-config --libs jit bitreader bitwriter ipo linker engine i get: -lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMMCParser -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMX86Info -lLLVMLinker -lLLVMArchive -lLLVMipo -lLLVMBitWriter -lLLVMBitReader -lLLVMJIT -lLLVMExecutionEngine -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMMC -lLLVMCore -lLLVMSupport Now i use in CMakeLists.txt following line: set(LLVM_LINK_COMPONENTS jit bitreader bitwriter ipo linker engine) After running CMake, target's link.txt contains following: /usr/bin/c++ <...> -lLLVMBitWriter -lLLVMipo -lLLVMLinker -lLLVMJIT -lLLVMArchive -lLLVMCodeGen -lLLVMExecutionEngine -lLLVMBitReader -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMCore -lLLVMMC -lLLVMSupport As you can see, this differs from output of llvm-config tool. This causes linking to fail due to unresolved externals. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110309/33c5a7ce/attachment.html>
Óscar Fuentes
2011-Mar-09 14:50 UTC
[LLVMdev] Discrepancies between bin/llvm-config --libs and LLVM_LINK_COMPONENTS in CMake.
arrowdodger <6yearold at gmail.com> writes:> llvm-config --libs jit bitreader bitwriter ipo linker engine[snip]> Now i use in CMakeLists.txt following line: > > set(LLVM_LINK_COMPONENTS jit bitreader bitwriter ipo linker engine)[snip]> As you can see, this differs from output of llvm-config tool. This causes > linking to fail due to unresolved externals.See if r127333 fixes the problem for you.
Apparently Analagous Threads
- [LLVMdev] Using LLVM components
- [LLVMdev] ExecutionEngine fails to use MCJIT, non-unique static member variables
- [LLVMdev] Building libLLVM-2.8svn.so fails to link on FreeBSD
- [LLVMdev] Code crashing in CreateGlobalStringPtr, passes when I add code for main routine + entry
- [LLVMdev] Is the option --enable-shared discontinued in 2.7?