This has outlived its usefulness, doesn’t gel well with newer compilers & -flto
related options, i.e thin vs full, or =auto
, and having -flto
as the only option means that sometimes this just needs to be worked around, i.e in oss-fuzz:
https://github.com/google/oss-fuzz/blob/master/projects/bitcoin-core/build.sh.
While it was convenient when -flto
was newer, support for -flto
is now in all compilers we use, and there’s also no-longer any real need for us to treat -flto
different to any other optimization option.
Remove it, to remove build complexity, and so there’s no need to port a similar option to CMake.
Note that the LTO option remains in depends, because we still need a way to build packages that have LTO specific patches/options.