[llvm-dev] (Thin)LTO llvm build

Teresa Johnson via llvm-dev llvm-dev at lists.llvm.org
Sat Sep 10 18:36:17 PDT 2016


On Sat, Sep 10, 2016 at 3:03 AM, Carsten Mattner via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> I tried building llvm, clang, lld, lldb from the 3.9 svn release
> branch with LTO, and some of the results were unexpected.
>
> I first tried to rebuild llvm with llvm-3.9, which has ThinLTO, by
> providing -DLLVM_ENABLE_LTO=Thin, but that failed very quickly, so I
>

I've been able to do a ThinLTO build of clang for some time with gold. I'm
not sure if there was a regression when the 3.9 release was cut? Can you
send me the error?

Thanks,
Teresa


> fell back to building with -DLLVM_ENABLE_LTO=On and using the system
> CC/CXX (gcc 6.1).
>
> The resulting installed build is many times bigger than the non-LTO
> version. Is this to be expected? I thought LTO would reduce size by
> detecting more unused code.
>
> The bindist .tar.xz archives are as follows:
>
> LTO=Off: 195MB
> LTO=On : 953MB
>
> Now, I am of course aware that falling back to gcc's lto support is
> not the same as llvm's lto or thinlto, but I only fell back after it
> failed to build that way, and I wasn't aware of gcc6 providing almost
> 5x large code than without lto.
>
> Also, given a fresh 3.9 install, on an otherwise gcc/libstdc++ system,
> how can I configure and build with -DLLVM_ENABLE_LTO=Thin? Is this
> supported, or does it require the use of some libXX too?
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>



-- 
Teresa Johnson |  Software Engineer |  tejohnson at google.com |  408-460-2413
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160910/0d220211/attachment.html>


More information about the llvm-dev mailing list