Reputation: 1146
In our case, the /DEBUG binary is 50% larger, the binary built with /DEBUG /OPT:REF is still 40% larger. From the answers in Visual Studio: debug information in release build I expected a release build with debug information shouldn't be that much larger. What are we missing?
This is one major reason why we're currently shipping the stripped binary, instead of one that's easy to debug. I'm not the build master, so please bear with me.
Sizes:
22MB with /O2
35MB with /O2 /DEBUG
32MB with /O2 /DEBUG /OPT:REF
Upvotes: 1
Views: 879
Reputation: 1372
According to the VS2005 documentation at http://msdn.microsoft.com/en-us/library/xe4t6fc1(v=vs.80).aspx:
/DEBUG changes the defaults for the /OPT option from REF to NOREF and from ICF to NOICF (so, you will need to explicitly specify /OPT:REF or /OPT:ICF).
So to reduce the size you can try to specify both:
/O2 /DEBUG /OPT:REF /OPT:ICF
Upvotes: 1
Reputation: 18431
Code probably won't product that large binary. Few hints:
Upvotes: 0
Reputation: 2691
If it was written in C++, STD could be complied much larger when not optimized. But I'm not sure if that is the case. How large in bytes exactly is that 50%?
Upvotes: 1