<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Sep 10, 2016 at 3:03 AM, Carsten Mattner via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I tried building llvm, clang, lld, lldb from the 3.9 svn release<br>
branch with LTO, and some of the results were unexpected.<br>
<br>
I first tried to rebuild llvm with llvm-3.9, which has ThinLTO, by<br>
providing -DLLVM_ENABLE_LTO=Thin, but that failed very quickly, so I<br></blockquote><div><br></div><div>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?</div><div><br></div><div>Thanks,</div><div>Teresa</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
fell back to building with -DLLVM_ENABLE_LTO=On and using the system<br>
CC/CXX (gcc 6.1).<br>
<br>
The resulting installed build is many times bigger than the non-LTO<br>
version. Is this to be expected? I thought LTO would reduce size by<br>
detecting more unused code.<br>
<br>
The bindist .tar.xz archives are as follows:<br>
<br>
LTO=Off: 195MB<br>
LTO=On : 953MB<br>
<br>
Now, I am of course aware that falling back to gcc's lto support is<br>
not the same as llvm's lto or thinlto, but I only fell back after it<br>
failed to build that way, and I wasn't aware of gcc6 providing almost<br>
5x large code than without lto.<br>
<br>
Also, given a fresh 3.9 install, on an otherwise gcc/libstdc++ system,<br>
how can I configure and build with -DLLVM_ENABLE_LTO=Thin? Is this<br>
supported, or does it require the use of some libXX too?<br>
______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="m_-8440534303519412816gmail_signature" data-smartmail="gmail_signature"><span style="font-family:Times;font-size:medium"><table cellspacing="0" cellpadding="0"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small"><td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Teresa Johnson |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Software Engineer |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:tejohnson@google.com" target="_blank">tejohnson@google.com</a> |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"> <a href="tel:408-460-2413" value="+14084602413" target="_blank">408-460-2413</a></td></tr></tbody></table></span></div>
</div></div>