You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After recent clang changes, now LTO is possible for clang with -flto=thin via custom_build_options and --enable-lto=thin for ffmpeg
Also x264 needs --enable-lto since it has linking errors because by default forces -mstack-alignment=64, but for ffmpeg and other libs it's -mstack-alignment=16
It would be nice to have some option to enable lto for clang, nowadays lto is quite common and compatible, also -flto=thin is just a bit slower than normal compilation, also some libs and tools may require individual flags for lto (like -DSVT_AV1_LTO=ON for svt-av1, -DENABLE_LTO for x265, etc)
At least as an experimental and unsupported option, because it might require more maintenance and have less compatibility
The text was updated successfully, but these errors were encountered:
LTO is still quite slow on Windows because malloc is just too slow, replace the malloc implementation speeds it up by an order of magnitude, but this doesn't apply to MinGW. On Linux ThinLTO is even faster than non-LTO. The biggest problem is that most libraries always build a bunch of useless shared libraries and tests executables at the same time, which is a huge waste of resources, and things like ffmpeg do a bunch of pointless build tests during configure, which is also extremely wasteful. If these factors were eliminated, ThinLTO wouldn't be that much slower.
After recent clang changes, now LTO is possible for clang with
-flto=thin
via custom_build_options and--enable-lto=thin
for ffmpegAlso x264 needs
--enable-lto
since it has linking errors because by default forces-mstack-alignment=64
, but for ffmpeg and other libs it's-mstack-alignment=16
It would be nice to have some option to enable lto for clang, nowadays lto is quite common and compatible, also
-flto=thin
is just a bit slower than normal compilation, also some libs and tools may require individual flags for lto (like-DSVT_AV1_LTO=ON
for svt-av1,-DENABLE_LTO
for x265, etc)At least as an experimental and unsupported option, because it might require more maintenance and have less compatibility
The text was updated successfully, but these errors were encountered: