<div dir="ltr">We also have this problem, and we are considering using fembed-bitcode: <a href="https://crbug.com/1196260">https://crbug.com/1196260</a><div><br></div><div>This way, we wouldn't do any kind of LTO for test binaries, we'd just link native objects and discard the bitcode sections. ThinLTO has the advantage that it may do less code generation of non-prevailing inline functions, but it is also more complex overall. It is too early for me to say which of these approaches is best, but we'll keep in touch.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 13, 2021 at 2:19 PM Petr Hosek via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">We're using regular LTO for our Clang toolchain build because we don't mind spending more resources to squeeze out as much performance as possible. However, when looking into our build performance, I've noticed that we only spent about 1/3 of the total build time in building distribution components, the rest is spent on building unit tests and tools that are only used by lit tests. For the latter, we don't care about the performance, so it'd be nice to avoid doing regular LTO to speed up the build.<div><br></div><div>The idea I had would be to use a single LTO bitcode format for all translation units, and then decide only at link time whether to use regular LTO for distribution components or ThinLTO for everything else.</div><div><br></div><div>After doing some research, I found the "<a href="https://www.snsystems.com/technology/tech-blog/supporting-regular-and-thin-lto-with-a-single-lto-bitcode-format" target="_blank">Supporting Regular and Thin LTO with a Single LTO Bitcode Format</a>" talk presented by Matthew Voss at LLVM Developers’ Meeting 2019 which does exactly what I described, but it seems like this was only implemented downstream.</div><div><br></div><div>Has there been any progress on upstreaming the implementation? Is there any way to do what I described using the in-tree LTO implementation?</div></div>
_______________________________________________<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="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>