question on optimization

Jim Marshall jim.marshall@wbemsolutions.com
Fri Oct 26 22:19:00 GMT 2007


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



More information about the Gcc-help mailing list