How to compile and install LLVM Gold plugin ( on Linux


You want to use the LLVM Gold linker plugin but can’t be found.


You should compile and install the LLVM gold plugin by yourself.

This guide has been tested on Ubuntu 12.04 and Ubuntu 12.10, but it should work on most Linux-based systems provided that you replace the  package-manager-specific commands appropriately.

A more unspecific and overcomplex, but official guide can be found here.

First, install the Gold linker (replacement for GNU ld) and the binutils dev package.

sudo apt-get install binutils-gold binutils-dev

After that, download the LLVM sourcecode from the LLVM releases website. Alternatively, get the latest version from SVN.

Unpack it and configure & compile it using these commands:

./configure --with-binutils-include=/usr/include

After that, you can find at ./Release+Asserts/lib/ Run

sudo cp ./Release+Asserts/lib/ /usr/local/lib/

to put it in the directory where clang/clang++ tries to find it.