[vlc-devel] [PATCH] [RFC] Configure: enable LTO if present

Rémi Denis-Courmont remi at remlab.net
Tue Aug 1 08:43:18 CEST 2017


Le 1 août 2017 09:35:40 GMT+03:00, Jean-Baptiste Kempf <jb at videolan.org> a écrit :
>Hello,
>
>On Tue, 1 Aug 2017, at 08:32, Rémi Denis-Courmont wrote:
>> Le 1 août 2017 00:41:50 GMT+03:00, Jean-Baptiste Kempf
><jb at videolan.org> a écrit :>> ---
>>> 
>>>  configure.ac | 6 ++++++
>>> 
>>>  1 file changed, 6 insertions(+)
>>> 
>>> 
>>> 
>>> diff --git a/configure.ac b/configure.ac
>>> 
>>> index e303715514..fe7e273ea0 100644
>>> 
>>> --- a/configure.ac
>>> 
>>> +++ b/configure.ac
>>> 
>>> @@ -1049,6 +1049,12 @@ AS_IF([test "${enable_optimizations}" !=
>"no"], [
>>> >>    RDC_PROG_CXX_FFLAGS([no-math-errno unsafe-math-optimizations
>no-rounding-math no-signaling-nans cx-limited-range])
>>> >>    AC_LANG_POP
>>> 
>>>  
>>> 
>>> +  dnl Check for LTO
>>> 
>>> +  RDC_PROG_CC_FFLAGS([lto])
>>> 
>>> +  AC_LANG_PUSH(C++)
>>> 
>>> +  RDC_PROG_CXX_FFLAGS([lto])
>>> 
>>> +  AC_LANG_POP
>>> 
>>> +
>>> 
>>>  AH_BOTTOM([
>>> 
>>>  #if defined(_MSC_VER) && !defined(__clang__)
>>> 
>>>  # pragma fenv_access(off)
>>> 
>> 
>> ODR violations should be fixed before LTO is enabled.
>
>Sure. I thought we destroyed most of them.
>
>>  And this breaks distcc and ccache, which will infuriate some devs,
>most probably.
>Then they can override the flags, or disable optimizations.
>But seriously, VLC is now quite fast to compile on a reasonably fast
>machine. Contribs are not.
>--
>Jean-Baptiste Kempf -  President
>+33 672 704 734
> 

There are still plenty of ODR violations across modules.

Compiling Qt is very slow with LTO. Skins2 is absolutely awful. And my computer is not that bad (mid-end Haswell desktop). The loss of ccache is also quite damaging on iterative basis.
-- 
Rémi Denis-Courmont
Typed on an inconvenient virtual keyboard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20170801/509dd1d8/attachment.html>


More information about the vlc-devel mailing list