Board index » cppbuilder » executable size optimizations

executable size optimizations


2003-07-26 02:35:48 AM
cppbuilder69
Dear mates,
It's known that Microsoft Visual C++ IDE project compiling procedures happen generally in two configurations, 'Debug' and 'Release'. The latter causes the compiler to generate considerablly small code (far less than 60 KB for a traditional 'Hello world' program).
The question is, how the smallest possible code is generated using Borland's C++ compiler for a small/medium sized source such as the previous example ?
Note: The switch -O1 for size optimization didn't actually reduce the size of the generated executable.
The compiler in question is Borland C++ 5.6 for win32, and the associated linker is Turbo Incremental Link 5.60 both shipped with Borland C++ Builder 6.
The compile procedure presumably will be on the command line.
Thank you.
//rk
 
 

Re:executable size optimizations

Hello Razmig,
I believe that the different between the DEBUG and RELEASE versions does not
include only Optimization but also code generation changes. Try removing
all the debug information by changing debug related options in the compiler
options as well as in the linking options.
Robert Lavoie, Canada
Razmig K a écrit dans le message <3f217884$ XXXX@XXXXX.COM >...
Quote
It's known that Microsoft Visual C++ IDE project compiling procedures
happen generally in two configurations, 'Debug' and 'Release'. The latter
causes the compiler to generate considerablly small code (far less than 60
KB for a traditional 'Hello world' program).