Our ultimate aspiration is to get to a point where we build with LTO by "default" (as much as anything is default in Gentoo). People ask occasionally what the plan is on this, so writing it down here. It's roughly going to look like: * Solving any (remaining) blockers * Enabling it for (some of) the binhost * Enabling it for all of the binhost * Enabling it for building stages themselves * Recommending it in the handbook * Perhaps adding it to the default make.conf In terms of big-picture infrastructure blockers, bug 926120 was the main one which is solved as of a few days ago (but need more packages to adopt it). See also https://wiki.gentoo.org/wiki/Project:Toolchain/LTO.
Specifically with regard to "perhaps adding it to the default make.conf" I don't think we can or even should do this. It's best used in build-once-run-many scenarios. And documenting it in the handbook is advocacy so users get to choose how interesting it is to them. But enabling it by default in the pre-shipped make.conf will result in it being used in many throwaway environments where it non-trivially raises build times without being used enough to justify the cost. Think e.g. CI environments building their dependencies.
(In reply to Eli Schwartz from comment #1) I'd even thought of this point the other night and apparently forgot about it. Yeah, I agree.
(In reply to Eli Schwartz from comment #1) > Specifically with regard to "perhaps adding it to the default make.conf" I > don't think we can or even should do this. > > It's best used in build-once-run-many scenarios. And documenting it in the > handbook is advocacy so users get to choose how interesting it is to them. > > But enabling it by default in the pre-shipped make.conf will result in it > being used in many throwaway environments where it non-trivially raises > build times without being used enough to justify the cost. > > Think e.g. CI environments building their dependencies. Isn't that a good thing? People would quickly find out if theres any issue with LTO on their software.
(In reply to zyxhere from comment #3) > Isn't that a good thing? People would quickly find out if theres any issue > with LTO on their software. They're using Gentoo in their CI to build dependencies, not using Portage to build the software itself, so it's just wasted time.
(In reply to zyxhere from comment #3) > Isn't that a good thing? People would quickly find out if theres any issue > with LTO on their software. No, because their software wouldn't be built with LTO, only the system dependencies. You can't even do LTO across shared library dependencies.