X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FGoldPlugin.html;h=77a417f5710d54c168ec26d0269b9ee908d80e59;hb=f40888dc9b2b1a28fb4e7ba9a1fc930461e251aa;hp=17a50aca6e9904b418662ab16cdc520d832859a4;hpb=347c7bbcb57f943ea9834e2ffdc6696508c55682;p=oota-llvm.git diff --git a/docs/GoldPlugin.html b/docs/GoldPlugin.html index 17a50aca6e9..77a417f5710 100644 --- a/docs/GoldPlugin.html +++ b/docs/GoldPlugin.html @@ -127,8 +127,9 @@ void foo4(void) { --- command lines --- $ llvm-gcc -flto a.c -c -o a.o # <-- a.o is LLVM bitcode file +$ ar q a.a a.o # <-- a.a is an archive with LLVM bitcode $ llvm-gcc b.c -c -o b.o # <-- b.o is native object file -$ llvm-gcc -use-gold-plugin a.o b.o -o main # <-- link with LLVMgold plugin +$ llvm-gcc -use-gold-plugin a.a b.o -o main # <-- link with LLVMgold plugin

Gold informs the plugin that foo3 is never referenced outside the IR, leading LLVM to delete that function. However, unlike in the @@ -157,7 +158,7 @@ export AR="$PREFIX/bin/ar" export NM="$PREFIX/bin/nm" export RANLIB=/bin/true #ranlib is not needed, and doesn't support .bc files in .a export CFLAGS="-O4" - +

  • Or you can just set your path:
    @@ -166,7 +167,7 @@ export CC="llvm-gcc -use-gold-plugin"
     export CXX="llvm-g++ -use-gold-plugin"
     export RANLIB=/bin/true
     export CFLAGS="-O4"
    -     
    +
  • Configure & build the project as usual: ./configure && make && make check