Home | History | Annotate | Download | only in docs

Lines Matching full:gold

5   <title>LLVM gold plugin</title>
10 <h1>LLVM gold plugin</h1>
29 the <a href="http://sourceware.org/binutils">gold linker</a> which supports
33 <p>The LLVM gold plugin implements the
34 <a href="http://gcc.gnu.org/wiki/whopr/driver">gold plugin interface</a>
44 <p>You need to have gold with plugin support and build the LLVMgold
45 plugin. Check whether you have gold running <tt>/usr/bin/ld -v</tt>. It will
46 report &#8220;GNU gold&#8221; or else &#8220GNU ld&#8221; if not. If you have
47 gold, check for plugin support by running <tt>/usr/bin/ld -plugin</tt>. If it
50 build gold or install a version with plugin support.</p>
52 <li>To build gold with plugin support:
61 ../src/configure --enable-gold --enable-plugins
62 make all-gold
64 That should leave you with <tt>binutils/build/gold/ld-new</tt> which supports the <tt>-plugin</tt> option. It also built would have
66 but don't have a visible -plugin option, instead relying on the gold plugin
84 ready to switch to using gold, backup your existing <tt>/usr/bin/ld</tt>
91 <p><tt>Clang</tt> has a <tt>-use-gold-plugin</tt> option which looks for the
92 gold plugin in the same directories as it looks for <tt>cc1</tt> and passes
94 linker, which is why you need gold to be the installed system linker in your
99 own gold, be sure to install the <tt>ar</tt> and <tt>nm-new</tt> you built to
108 <p>The following example shows a worked example of the gold plugin mixing
146 $ clang -use-gold-plugin a.a b.o -o main # &lt;-- link with LLVMgold plugin
149 <p>Gold informs the plugin that foo3 is never referenced outside the IR,
152 example</a> gold does not currently eliminate foo4.</p>
178 export CC="$PREFIX/bin/clang -use-gold-plugin"
179 export CXX="$PREFIX/bin/clang++ -use-gold-plugin"
189 export CC="clang -use-gold-plugin"
190 export CXX="clang++ -use-gold-plugin"
209 <p>Gold is licensed under the GPLv3. LLVMgold uses the interface file
210 <tt>plugin-api.h</tt> from gold which means that the resulting LLVMgold.so
212 as much as gold could without the plugin.</p>