Re: LTO on Windows now working

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday 25 of September 2020, Tor Lillqvist wrote:
> Would it be simpler if we didn't have a separate gb_LTOFLAGS but simply
> added the LTO flags into $CC and $CXX (or $CFLAGS)?
>
> I think that at least with Apple's linker, using "Thin" LTO (
> https://blog.llvm.org/posts/2016-06-21-thinlto-scalable-and-incremental-lto
>/ ) is supposed to be quite transparent. You just compile all (or even just
> a subset) of your source code with -flto=thin, and the linker will notice
> and apply LTO to those objects. You will just notice the increased link
> time, (Probably offset by somewhat decreased compile time, though.)


 The link time vastly increases compared to compile time savings. Adding LTO 
flags directly to CFLAGS/CXXFLAGS would apply LTO to everything, which 
possibly wouldn't really be worth it.

> The -flto=thin mode is available also in Clang on LInux, but, as you say,
> then you need to know that the linker that gets used also supports it.

 Not just the linker. As soon as static libraries are involved, ar and ranlib 
need to be LTO-capable as well.

 This all shouldn't be that difficult to check in configure though.

-- 
 Luboš Luňák
 l.lunak@xxxxxxxxxxxxx
_______________________________________________
LibreOffice mailing list
LibreOffice@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/libreoffice




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux