This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [texi, LTO]: Mention that -flto and -fwhole-program can be used simultaneously


Tobias Burnus wrote:

I had the impression that it is not obvious that -fwhole-program can be
applied simultaneously -- and that one may think that -flto already
does the -fwhole-program optimizations as it sees the whole program
(which is not the case).

It certainly was not obvious to me, but after reading the documentation about -fwhole-program that was there, it occurred to me that, at link time, link-time-optimization *does* see the whole program, so -fwhole-program could just as well be implied when "linking" (err, calling collect2).


The tricky term in the docs is the "current compilation unit", which is definitely pre-lto.

--
Toon Moene - e-mail: toon@moene.org - phone: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
At home: http://moene.org/~toon/
Progress of GNU Fortran: http://gcc.gnu.org/gcc-4.5/changes.html


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]