[LLVMdev] linking a parser bitcode
samuraileumas at yahoo.com
Fri Dec 4 13:00:45 PST 2009
My partner and I am modifying a PEG parser generator to produce LLVM bitcode from a version of a parsing expression grammar that takes LLVM Assembly as code. It accepts external libraries in its current state so we are writing an external library in C++ using C bindings for the linkage. Trying to get it to link is proving to be more challenging than expected. My partner is trying to link on a Win32 system so the Gold plugin is not an option. He also doesn't have Perl installed so using llvm-config is also not an option.
Here is the command line of trying to compile the resultant amos.bc file from our parser generator with the main program that hosts it:
llvm-link -o out.bc main.bc amos.bc
llc -f out.bc
..\..\..\..\llvm-gcc\bin\llvm-g++ out.s -L..\..\..\..\llvm\lib -L..\..\..\..\llvm-gcc\lib -lgcc -lLLVMLinker -lLLVMipo -lLLVMInstrumentation -lLLVMDebugger -lLLVMBitWriter -lLLVMAsmParser -lLLVMArchive -lLLVMBitReader -lLLVMAsmPrinter -lLLVMCodeGen -lLLVMScalarOpts -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMCore -lLLVMSupport -lLLVMSystem -lsupc++
It is complaining about not being able to find __gxx_personality_sj0 and the LLVM command line parser-related files. What else do we need to link?
More information about the llvm-dev