Cristian Zamfir
2011-Jun-13 22:37 UTC
[LLVMdev] producing a single LLVM bitcode file using the LLVM gold plugin
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. 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
Nick Lewycky
2011-Jun-13 23:13 UTC
[LLVMdev] producing a single LLVM bitcode file using the LLVM gold plugin
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>
Cristian Zamfir
2011-Jun-22 13:19 UTC
[LLVMdev] producing a single LLVM bitcode file using the LLVM gold plugin
On Jun 14, 2011, at 1:13 AM, Nick Lewycky wrote:> 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.Great, thanks, indeed it works with LLVM 2.9 and the latest binutils.> > 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.I wanted to ease the compilation to LLVM for various projects that already have a build system, such as Apache httpd. I could easily get a bitcode of httpd now. Cristi> 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 >