[llvm] r196069 - Update the LTO GoldPlugin documentation

Alp Toker alp at nuanti.com
Mon Dec 2 00:26:31 PST 2013


On 02/12/2013 07:54, Bill Wendling wrote:
> For the 3.4 branch? :-)

Sure! New gold build instructions confirmed working here.

Might want to grab r196062 fixing a typo in the MallocChecker bug report 
informational output as well.

Cheers,
Alp.

>
> -bw
>
> On Dec 1, 2013, at 11:15 PM, Alp Toker <alp at nuanti.com> wrote:
>
>> Author: alp
>> Date: Mon Dec  2 01:15:33 2013
>> New Revision: 196069
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=196069&view=rev
>> Log:
>> Update the LTO GoldPlugin documentation
>>
>> * Update build instructions to reflect the current source tree layout.
>> * Don't inflict CVS on readers; there's a perfectly good git mirror.
>> * configure with --disable-werror making it possible to build using clang.
>> * ar and nm-new now support the -plugin option.
>>
>> Modified:
>>     llvm/trunk/docs/GoldPlugin.rst
>>
>> Modified: llvm/trunk/docs/GoldPlugin.rst
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/GoldPlugin.rst?rev=196069&r1=196068&r2=196069&view=diff
>> ==============================================================================
>> --- llvm/trunk/docs/GoldPlugin.rst (original)
>> +++ llvm/trunk/docs/GoldPlugin.rst Mon Dec  2 01:15:33 2013
>> @@ -30,29 +30,22 @@ by running ``/usr/bin/ld -plugin``. If i
>> you have plugin support. If not, such as an "unknown option" error then you
>> will either need to build gold or install a version with plugin support.
>>
>> -* To build gold with plugin support:
>> +* Download, configure and build gold with plugin support:
>>
>>    .. code-block:: bash
>>
>> -     $ mkdir binutils
>> -     $ cd binutils
>> -     $ cvs -z 9 -d :pserver:anoncvs at sourceware.org:/cvs/src login
>> -     {enter "anoncvs" as the password}
>> -     $ cvs -z 9 -d :pserver:anoncvs at sourceware.org:/cvs/src co binutils
>> +     $ git clone --depth 1 git://sourceware.org/git/binutils-gdb.git binutils
>>       $ mkdir build
>>       $ cd build
>> -     $ ../src/configure --enable-gold --enable-plugins
>> +     $ ../binutils/configure --enable-gold --enable-plugins --disable-werror
>>       $ make all-gold
>>
>> -  That should leave you with ``binutils/build/gold/ld-new`` which supports
>> -  the ``-plugin`` option. It also built would have
>> -  ``binutils/build/binutils/ar`` and ``nm-new`` which support plugins but
>> -  don't have a visible -plugin option, instead relying on the gold plugin
>> -  being present in ``../lib/bfd-plugins`` relative to where the binaries
>> -  are placed.
>> +  That should leave you with ``build/gold/ld-new`` which supports
>> +  the ``-plugin`` option. Running ``make`` will additionally build
>> +  ``build/binutils/ar`` and ``nm-new`` binaries supporting plugins.
>>
>> * Build the LLVMgold plugin: Configure LLVM with
>> -  ``--with-binutils-include=/path/to/binutils/src/include`` and run
>> +  ``--with-binutils-include=/path/to/binutils/include`` and run
>>    ``make``.
>>
>> Usage
>> @@ -72,9 +65,10 @@ the ``lib`` directory under its prefix a
>> ``ld``. It will not look for an alternate linker, which is why you need
>> gold to be the installed system linker in your path.
>>
>> -If you want ``ar`` and ``nm`` to work seamlessly as well, install
>> -``LLVMgold.so`` to ``/usr/lib/bfd-plugins``. If you built your own gold, be
>> -sure to install the ``ar`` and ``nm-new`` you built to ``/usr/bin``.
>> +``ar`` and ``nm`` also accept the ``-plugin`` option and it's possible to
>> +to install ``LLVMgold.so`` to ``/usr/lib/bfd-plugins`` for a seamless setup.
>> +If you built your own gold, be sure to install the ``ar`` and ``nm-new`` you
>> +built to ``/usr/bin``.
>>
>>
>> Example of link time optimization
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

-- 
http://www.nuanti.com
the browser experts




More information about the llvm-commits mailing list