Meta: Make the "Release" build type use -O3 and -flto
This doesn't affect the default preset, but the Distribution preset will now compile with these flags instead.
The "right away" to LTO is with https://cmake.org/cmake/help/latest/module/CheckIPOSupported.html and https://cmake.org/cmake/help/latest/prop_tgt/INTERPROCEDURAL_OPTIMIZATION.html / https://cmake.org/cmake/help/latest/variable/CMAKE_INTERPROCEDURAL_OPTIMIZATION.html
I believe we use the pattern in Serenity's Kernel?
Should we enable lto for the static libraries from vcpkg as well?
The "right away" to LTO is with https://cmake.org/cmake/help/latest/module/CheckIPOSupported.html and https://cmake.org/cmake/help/latest/prop_tgt/INTERPROCEDURAL_OPTIMIZATION.html / https://cmake.org/cmake/help/latest/variable/CMAKE_INTERPROCEDURAL_OPTIMIZATION.html
Oh nice, updated!
Should we enable lto for the static libraries from vcpkg as well?
I end up with a lot of errors like these when building dav1d if I do that:
<instantiation>:21:9: error: unknown directive
.func _dav1d_ipred_dc_128_8bpc_neon
^
../src/1.5.0-c16881aeb7.clean/src/arm/64/ipred.S:35:1: note: while in macro instantiation
function ipred_dc_128_8bpc_neon, export=1
^
(FWIW, LTO is a much bigger win when combined with PGO. If you have just one of the two, PGO is a bigger win than LTO.)