kobe James
2011-Jul-07 07:44 UTC
[LLVMdev] Does also-emit-llvm plugin option in gold plugin still work?
I installed LLVM gold plugin and can ran the example in http://llvm.org/docs/GoldPlugin.html#example1. Then I tried to use it to build a big project. I set the environment variables like: export CC="/usr/local/bin/clang -use-gold-plugin -Wl, -plugin-opt=also-emit-llvm" export CXX="/usr/local/bin/clang++ -use-gold-plugin -Wl, -plugin-opt=also-emit-llvm" export AR="/usr/bin/ar" export NM="/usr/bin/nm" export RANLIB=/bin/true #ranlib is not needed, and doesn't support .bc files in .a export CFLAGS="-O4" ========================== Then I ran configure and make but got the following errors: clang: warning: -Wl,: 'linker' input unused when '-c' is present clang: warning: argument unused during compilation: '-plugin-opt=also-emit-llvm' CXX(target) llvm/Debug/obj.target/base/base/base64.o clang: warning: -Wl,: 'linker' input unused when '-c' is present clang: warning: argument unused during compilation: '-plugin-opt=also-emit-llvm' CXX(target) llvm/Debug/obj.target/base/base/event_recorder_stubs.o clang: warning: -Wl,: 'linker' input unused when '-c' is present clang: warning: argument unused during compilation: '-plugin-opt=also-emit-llvm' CXX(target) llvm/Debug/obj.target/base/base/file_descriptor_shuffle.o Do you know how I can solve this problem? Thanks in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110707/61424b7a/attachment.html>
Rafael Ávila de Espíndola
2011-Jul-07 15:12 UTC
[LLVMdev] Does also-emit-llvm plugin option in gold plugin still work?
> =========================> Then I ran configure and make but got the following errors: > clang: warning: -Wl,: 'linker' input unused when '-c' is present > clang: warning: argument unused during compilation: > '-plugin-opt=also-emit-llvm' > CXX(target) llvm/Debug/obj.target/base/base/base64.o > clang: warning: -Wl,: 'linker' input unused when '-c' is present > clang: warning: argument unused during compilation: > '-plugin-opt=also-emit-llvm' > CXX(target) llvm/Debug/obj.target/base/base/event_recorder_stubs.o > clang: warning: -Wl,: 'linker' input unused when '-c' is present > clang: warning: argument unused during compilation: > '-plugin-opt=also-emit-llvm' > CXX(target) llvm/Debug/obj.target/base/base/file_descriptor_shuffle.o > > > Do you know how I can solve this problem? Thanks in advance.Those are warnings. You can put the -Wl,-plugin-opt in LDFLAGS. Open a bug if you think that we shouldn't warn for clang -c -Wl,foo bar.c Cheers, Rafael