On Tue, Oct 24, 2023 at 02:39:49PM -0700, Simon Glass wrote:
> Hi Tom,
> 
> On Tue, 24 Oct 2023 at 11:07, Tom Rini <tr...@konsulko.com> wrote:
> >
> > On Tue, Oct 24, 2023 at 11:02:06AM -0700, Simon Glass wrote:
> > > Hi Tom,
> > >
> > > On Mon, 23 Oct 2023 at 10:28, Tom Rini <tr...@konsulko.com> wrote:
> > > >
> > > > On Mon, Oct 23, 2023 at 10:13:52AM -0700, Simon Glass wrote:
> > > >
> > > > [snip]
> > > > > BTW buildman supports -L which disabled LTO using the NO_LTO=1 option
> > > >
> > > > I worry about putting sandbox-specific flags in buildman.  Outside of
> > > > sandbox, targets that enable LTO require LTO, just like any other CONFIG
> > > > option.
> > >
> > > Some problems with LTO and why I don't normally develop with it enabled:
> > >
> > > - build time
> > > - code moves around all over the place so it is hard to compare size 
> > > growth
> > >
> > > At least for my IDE flow, I use -L in most cases. Yes there are some
> > > boards which won't fit without LTO, but I don't see them much.
> > >
> > > So this is mostly a dev convenience / productivity tool.
> >
> > Yes, it does take longer to link.  And yes, a more complex optimization
> > does make some size tracking harder to understand (since growth or
> > shrinkage allows for different optimizations to be made around it). But
> > everything in configs/ that enables LTO needs LTO.
> 
> I thought we were planning to enable it for all of ARM, though?
> Clearly most of those boards don't *need* it.

Yes, closer to when it was introduced the ideal was to make it default,
because there are so many "on the edge" platforms, with respect to size
limits.  And, we could possibly make it default now and see what that
does to CI build times too.  But no, today, platforms opt-in for it
because they need it, and the most common need is because of size rather
than speed (or, speed gained through size reduction).

And also yes, that it does make size comparison trickier is another
reason I've not aggressively pushed for it globally.

But yes, I still don't think disabling LTO is a general feature, and only
sandbox has it architecture-wide enabled by default (for testing) and
that -L/--no-lto is not a good generic feature for buildman.

But I too don't wish to argue points around LTO nor gc-sections either
anymore.

-- 
Tom

Attachment: signature.asc
Description: PGP signature

Reply via email to