Enhancement: Let users choose between full and thin LTO if applicable
It would be nice if there was a flag to let users choose between slow, full LTO (which sometimes may be desired, because there are cases where full LTO still offers a massive performance benefit over thin LTO) and the currently standard thin LTO
I believe on clang this would map to -flto
and -flto=thin
- I can't say on gcc, perhaps -flto
and -fwhopr
?
The flag could be named CMAKE_INTERPROCEDURAL_OPTIMIZATION_PREFERRED_TYPE
or CMAKE_IPO_PREFERRED_TYPE
and (for now) take the values FULL
and THIN