[PR lto/41528] Add internal documentation in doc/lto.texi

Ralf Wildenhues Ralf.Wildenhues@gmx.de
Wed Nov 17 20:46:00 GMT 2010


* Richard Guenther wrote on Wed, Nov 17, 2010 at 10:59:04AM CET:
> On Tue, 16 Nov 2010, Ralf Wildenhues wrote:
> > * Diego Novillo wrote on Mon, Nov 15, 2010 at 07:23:15AM CET:
> > > +optimized builds.  A, perhaps surprising, side effect of this feature
> > > +is that any mistake in the toolchain that leads to LTO information not
> > > +being used (e.g. an older @code{libtool} calling @code{ld} directly).
> > > +This is both an advantage, as the system is more robust, and a
> > > +disadvantage, as the user is not informed that the optimization has
> > > +been disabled.
> > 
> > Well, such a disadvantage could be ameliorated with a warning, no?
> > 
> > Rainer just mentioned other instances where LTO would silently not do
> > TRT (nm in PATH with different format, etc), so it would seem generally
> > useful to at least optionally warn.
> 
> I can't see how this is possible, or if it is, then how it is possible
> to detect the legitimate case of using the fat binary w/o link time
> optimization.

Well, when -flto (or similar) is passed to the compiler driver at link
time, that surely is a sign that LTO is desired, no?  I'm not asking
about a fatal error, but a helpful warning, ideally telling the user
also why LTO was not enabled, would seem prudent in that case.

I'm arguing from a pure user-side perspective here; if that is not
possible technically, I'd be delighted to hear about why.

Thanks,
Ralf



More information about the Gcc-patches mailing list