This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
question on optimization
- From: Jim Marshall <jim dot marshall at wbemsolutions dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Fri, 26 Oct 2007 17:23:21 -0400
- Subject: question on optimization
I was wondering if you would get better optimizations from GCC by doing
a "bulk' build or a 'individual' build. For example our current build
system compiles each file separately with the /c switch and then links
all the object files. Would we (potentially) get better optimization if
we compiled all the modules together, e.g.
gcc <options> module1.c module2.c ... moduleN.c?
Oddly enough I was looking for stuff on the web about this and for some
reason I hit a document talking about whole program optimization in
Visual Studio, where the linker actually does some of the optimizations
(http://www.codeproject.com/tips/gloption.asp).
Thanks
Jim