[LLVMdev] I have built a whole-program bitcode file foropenldap-2.19

Rafael Espindola espindola at google.com
Fri Oct 30 20:13:39 PDT 2009


2009/10/30 Nan Zhu <zhunansjtu at gmail.com>:
> I'm not completely sure but something like the build system will still call
> the native linker when it meets a LLVM object file which causes an error.

That is what the gold plugin is for. It makes gold able to handle .o files
with LLVM IL.

> I once tried to modify the codes of gold-plugin, but the trouble is still
> there,I think we should hack collect2 of llvm-gcc to make it invoke llvm-ld
> automatically when it receive the -emit-llvm option(I once tried this, but I
> found that even llvm-gcc has received such a option it will not pass it to
> -emit-llvm, I attempted to do something on llvm-gcc,but I'm not familiar
> with GCC's src)

Do you remember if the problem was wen using static libraries (.a)?
For that to work ar also has to understand LLVM IL. That is possible
in recent binutils by building with --enable-plugins and coping
the llvm plugin to the install directory.

Cheers,
-- 
Rafael Ávila de Espíndola




More information about the llvm-dev mailing list