bitcoin/bitcoin — pull request #1557 by TheBlueMatt (2012-07-04 19:46:51+00:00)
Title: Make building using LLVM/Clang easier.

This is based on #1514 and adds fixes to bitcoin-qt.pro to build with clang+lto without editing makefiles.
After this, you can use:
qmake bitcoin-qt.pro USE_CLANG=1 USE_LTO=1 && make
or
make -f makefile.unix CXX=clang++ LDFLAGS="-use-gold-plugin" CXXFLAGS=-emit-llvm
Building bitcoind requires ld-gold, however bitcoin-qt does not.

Motivation here is a speedup:
clang-lto: " block index 6523ms"
gcc-lto: " block index 8497ms"

That said,
Seriously, every time I've seen a major speedup with clang it was miscompiling the code.
Still its interesting that there is a speedup that large, and making it easier to compile using clang is not bad.