[LLVMdev] Linking a bc file

Alexandre Cossette alex.cossette at gmail.com
Mon Nov 22 20:38:13 PST 2010


Hi Anton,

>> I'm trying to test a bitcode file that I created using the LLVM API. Using llvm-g++, how can I compile.a C++ file and link it against my bc file ? I try to call a single function in the bc file from the c++ main function.
> You need to have a linker which supports linking of LLVM bitcode. So
> far this is darwin linker and gold with extra plugin. This doc might
> be helpful: http://llvm.org/docs/GoldPlugin.html

Thanks, this is good to know (I somehow skipped this part when reading
LLVM doc) but I don't need anything fancy like LTO for now. I solved
my simple problem by using llc and then linking native object files.

Alex



More information about the llvm-dev mailing list