<div class="gmail_quote">On 13 June 2011 15:37, Cristian Zamfir <span dir="ltr"><<a href="mailto:cristian.zamfir@epfl.ch">cristian.zamfir@epfl.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello,<br>
<br>
Is it still possible to produce the LLVM bitcode after linking using the LLVM gold plugin?<br>
I get the warning "ld: warning: Ignoring flag also-emit-llvm" and the LLVM bitcode is not dumped.<br>
<br>
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.<br></blockquote><div><br></div><div>No, that flag to the gold plugin was added Jun 3, 2010 while LLVM 2.6 was released Oct 23, 2009.</div>
<div><br></div><div>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.</div>
<div><br></div><div>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.</div><div><br></div><div>Nick</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
This is the command I use:<br>
lvm-gcc -Wall -g --emit-llvm -O4 -use-gold-plugin -Wl,-plugin-opt=also-emit-llvm test.c f.c -o main<br>
ld: warning: Ignoring flag also-emit-llvm<br>
<br>
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) ?<br>
<br>
Thank you.<br>
Cristi<br>
<br>
<br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote></div><br>