# LTO support for CLANG



## alie (Aug 29, 2012)

Hi,

I just saw these lines:


> 0) build gold and libLLVMgold.so (see http://llvm.org/docs/LinkTimeOptimization.html)
> 1) CFLAGS+=-emit-llvm
> 2) setenv LD "/tmp/ld-new --plugin /tmp/libLLVMgold.so"
> 3) setenv CC clang
> 4) build the kernel



From http://wiki.freebsd.org/BuildingFreeBSDWithClang

There is no way to build the gold when i check http://llvm.org/docs/LinkTimeOptimization.html

Anyone have steps/how-to to build the gold? please help.


----------

