[LLVMdev] producing a single LLVM bitcode file using the LLVM gold plugin

Nick Lewycky nlewycky at google.com
Mon Jun 13 16:13:14 PDT 2011


On 13 June 2011 15:37, Cristian Zamfir <cristian.zamfir at epfl.ch> wrote:

> Hello,
>
> Is it still possible to produce the LLVM bitcode after linking using the
> LLVM gold plugin?
> I get the warning "ld: warning: Ignoring flag also-emit-llvm" and the LLVM
> bitcode is not dumped.
>
> I installed the LLVM gold plugin using the latest binutils from CVS and
> LLVM 2.6, since I read on the discussion list that this was possible with
> LLVM 2.6.
>

No, that flag to the gold plugin was added Jun 3, 2010 while LLVM 2.6 was
released Oct 23, 2009.

If all you want to do is merge multiple .bc files into one, you can run
"llvm-link *.bc -o linked.bc". If you want to optimize, "opt -std-link-opts
linked.bc -o linked.optimized.bc" will work too.

The gold plugin is really for use when linking bitcode with non-bitcode
(system libraries). If you need that and also want to emit .bc files, you'll
need to upgrade.

Nick


>
> This is the command I use:
> lvm-gcc -Wall -g --emit-llvm -O4 -use-gold-plugin
> -Wl,-plugin-opt=also-emit-llvm  test.c f.c -o main
> ld: warning: Ignoring flag also-emit-llvm
>
> Can somebody please clarify if this option is still supported? If not, if
> anybody is working on enabling it again (or maybe have some tips on where to
> start) ?
>
> Thank you.
> Cristi
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110613/b8ba7ebd/attachment.html>


More information about the llvm-dev mailing list