[lldb-dev] Q: link order for lldb
Malea, Daniel
daniel.malea at intel.com
Wed Jan 16 14:33:33 PST 2013
I'm not sure how it works on Windows -- cygwin can be finicky sometimes. On Linux though, the following linker invocation works:
llvm[3]: Linking Debug+Asserts Shared Library liblldb.so
g++ -I/home/baldrick/lldb/build/include -I/home/baldrick/lldb/build/tools/lldb/lib -I/home/baldrick/lldb/llvm/include -I/home/baldrick/lldb/llvm/tools/lldb/lib -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -g -fvisibility-inlines-hidden -fno-exceptions -fno-rtti -fPIC -Woverloaded-virtual -Wcast-qual -std=c++0x -g -Wl,-R -Wl,'$ORIGIN' -L/home/baldrick/lldb/build/Debug+Asserts/lib -L/home/baldrick/lldb/build/Debug+Asserts/lib -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings -Wno-uninitialized -shared -o /home/baldrick/lldb/build/Debug+Asserts/lib/liblldb.so \
-Wl,--whole-archive -llldbAPI -llldbBreakpoint -llldbCommands -llldbCore -llldbExpression -llldbHostCommon -llldbInitAndLog -llldbInterpreter -llldbPluginABIMacOSX_arm -llldbPluginABIMacOSX_i386 -llldbPluginABISysV_x86_64 -llldbPluginDisassemblerLLVM -llldbPluginDynamicLoaderStatic -llldbPluginDynamicLoaderPOSIX -llldbPluginEmulateInstructionARM -llldbPluginLanguageRuntimeCPlusPlusItaniumABI -llldbPluginLanguageRuntimeObjCAppleObjCRuntime -llldbPluginObjectContainerBSDArchive -llldbPluginObjectFileELF -llldbPluginObjectFilePECOFF -llldbPluginOperatingSystemPython -llldbPluginPlatformGDBServer -llldbPluginProcessGDBRemote -llldbPluginSymbolFileDWARF -llldbPluginSymbolFileSymtab -llldbPluginUnwindAssemblyInstEmulation -llldbPluginUnwindAssemblyx86 -llldbPluginUtility -llldbSymbol -llldbTarget -llldbUtility -lclangAnalysis -lclangAST -lclangBasic -lclangCodeGen -lclangFrontend -lclangDriver -lclangEdit -lclangLex -lclangParse -lclangSema -lclangSerialization -lLLVMMCDisassembler -llldbPluginPlatformMacOSX -llldbPluginPlatformLinux -llldbPluginPlatformFreeBSD -lclangRewriteCore -lclangRewriteFrontend -llldbHostLinux -llldbPluginProcessLinux -llldbPluginProcessPOSIX -llldbPluginDynamicLoaderMacOSX -llldbPluginDynamicLoaderDarwinKernel -llldbPluginOperatingSystemDarwinKernel -Wl,--no-whole-archive -lLLVMLinker -lLLVMArchive -lLLVMMCJIT -lLLVMJIT -lLLVMRuntimeDyld -lLLVMExecutionEngine -lLLVMipo -lLLVMVectorize -lLLVMInstrumentation -lLLVMBitWriter -lLLVMBitReader -lLLVMAsmParser -lLLVMHexagonCodeGen -lLLVMHexagonDesc -lLLVMHexagonInfo -lLLVMHexagonAsmPrinter -lLLVMNVPTXCodeGen -lLLVMNVPTXDesc -lLLVMNVPTXInfo -lLLVMNVPTXAsmPrinter -lLLVMMBlazeDisassembler -lLLVMMBlazeCodeGen -lLLVMMBlazeDesc -lLLVMMBlazeAsmPrinter -lLLVMMBlazeAsmParser -lLLVMMBlazeInfo -lLLVMCppBackendCodeGen -lLLVMCppBackendInfo -lLLVMMSP430CodeGen -lLLVMMSP430Desc -lLLVMMSP430Info -lLLVMMSP430AsmPrinter -lLLVMXCoreDisassembler -lLLVMXCoreCodeGen -lLLVMXCoreDesc -lLLVMXCoreInfo -lLLVMXCoreAsmPrinter -lLLVMMipsDisassembler -lLLVMMipsCodeGen -lLLVMMip
sAsmParser -lLLVMMipsDesc -lLLVMMipsInfo -lLLVMMipsAsmPrinter -lLLVMARMDisassembler -lLLVMARMCodeGen -lLLVMARMAsmParser -lLLVMARMDesc -lLLVMARMInfo -lLLVMARMAsmPrinter -lLLVMPowerPCCodeGen -lLLVMPowerPCDesc -lLLVMPowerPCInfo -lLLVMPowerPCAsmPrinter -lLLVMSparcCodeGen -lLLVMSparcDesc -lLLVMSparcInfo -lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMMCParser -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMX86Desc -lLLVMX86Info -lLLVMTarget -lLLVMX86AsmPrinter -lLLVMMC -lLLVMObject -lLLVMX86Utils -lLLVMCore -lLLVMSupport -Wl,--no-undefined -L/usr/lib/python2.6/config -lpthread -ldl -lutil -lm -lpython2.6 -lrt -lpthread -lrt -ldl -lm
Out of curiosity, what made you abandon the cmake route? I was hoping to take the cmakefiles from the windows branch and port them to Linux at some point... It's somewhat concerning if they are problematic even on Windows.
Best of luck,
Dan
On 2013-01-16, at 5:23 PM, Pawel Wodnicki wrote:
> Hi,
>
> I got to the point where I can link on cygwin. I am using
> configure/make to build, but at the moment it seems to be
> a bit broken and on cygwin does not produce proper link command.
>
> I just want to link for now :-) so I am fiddling with Makefile
> and running into link problems like:
>
> .../lib/liblldbExpression.a(DWARFExpression.o):DWARFExpression.cpp:(.text+0x1d74):
> undefined reference to`lldb_private::DataEncoder::~DataEncoder()'
>
> I do not think I have a complete nor even correct link order (pasted
> below for reference) and the moment I do not have access to OS X
> nor Linux machine to check.
>
> Is there a way to determine proper order of dependencies for lldb?
>
> Paweł
>
>
>
> -llldbAPI -llldbBreakpoint -llldbCommands \
> -llldbCore -llldbExpression -llldbHostCommon -llldbInitAndLog \
> -llldbInterpreter -llldbPluginABIMacOSX_arm -llldbPluginABIMacOSX_i386 \
> -llldbPluginABISysV_x86_64 -llldbPluginDisassemblerLLVM \
> -llldbPluginDynamicLoaderStatic -llldbPluginEmulateInstructionARM \
> -llldbPluginLanguageRuntimeCPlusPlusItaniumABI \
> -llldbPluginLanguageRuntimeObjCAppleObjCRuntime \
> -llldbPluginObjectContainerBSDArchive -llldbPluginObjectFileELF \
> -llldbPluginObjectFilePECOFF -llldbPluginPlatformGDBServer \
> -llldbPluginProcessGDBRemote -llldbPluginSymbolFileDWARF \
> -llldbPluginSymbolFileSymtab -llldbPluginUnwindAssemblyInstEmulation \
> -llldbPluginUnwindAssemblyx86 -llldbPluginUtility -llldbSymbol \
> -llldbTarget -llldbUtility -lclangAnalysis -lclangAST -lclangBasic \
> -lclangCodeGen -lclangFrontend -lclangDriver -lclangEdit \
> -lclangLex -lclangRewriteCore -lclangRewriteFrontend -lclangParse
> -lclangSema -lclangSerialization \
> -lLLVMMCDisassembler -llldbPluginPlatformMacOSX \
> -llldbPluginPlatformLinux -llldbPluginPlatformFreeBSD \
> -llldbPluginDynamicLoaderPOSIX -Wl,--no-whole-archive \
> -lLLVMLinker -lLLVMArchive -lLLVMMCJIT -lLLVMJIT -lLLVMRuntimeDyld \
> -lLLVMExecutionEngine -lLLVMipo -lLLVMVectorize -lLLVMInstrumentation \
> -lLLVMBitWriter -lLLVMBitReader -lLLVMAsmParser -lLLVMX86AsmParser \
> -lLLVMX86Disassembler -lLLVMX86CodeGen -lLLVMSelectionDAG \
> -lLLVMAsmPrinter -lLLVMMCParser -lLLVMCodeGen -lLLVMScalarOpts \
> -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis \
> -lLLVMX86Desc -lLLVMX86Info -lLLVMTarget -lLLVMX86AsmPrinter -lLLVMMC \
> -lLLVMObject -lLLVMX86Utils -lLLVMCore -lLLVMSupport -Wl,--no-undefined \
> -lpthread -ldl -lm
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
More information about the lldb-dev
mailing list