I was trying to use LTO facility of LLVM to reduce the footprint of
Clang itself. I build the ld-gold and LLVMgold.so as described at 
and then set the environment as described too. However, had to add the
path for plugin manually as Clang was not able pass it to ld
automatically. Following is the setting I used before starting to
build (small foot Clang.
CC=clang -flto -Wl,--plugin=/home/wer/llvm-3.0/build_config_gold_release/Release/lib/LLVMgold.so
Then configured and did the build for LLVM. While building Clang tool,
there may be large part of LLVM/Clang libraries which are not used by
Clang. So I was expecting appreciable reduction in size for Clang.
However memory savings were minimal.
Also, as explained in  in the topic "Compiler driver invokes link
time optimizer separately." , there are many cases when invoking Clang
with -flto may not remove the dead code. However I cannot figure out
how to build the Clang with first compiling all files to LLVM bit code
and then allow linker to treat them as compiled binaries which can be
linked together with LTO pass.
If this is possible by changes in Makefiles or build system, it can
help me a lot in removing some generic parts in Clang too to make a
less generic but lighter compiler tool.
Please help me with the same.