Hello comrades !
I was going through fpc switches & options the other day and I noticed that normal fpc compile without debug info works as intended ..... so ... I was wondering why do I have to use strip to remove them from my final Lazarus builds ...
So, I went through Lazarus project options and tested compiler options looking for this 'behaviour' on a simple empty Lazarus form application. It seems that if any of the debug switches are selected under the Linking tab then the binary size will be monstrous (with the exception of -Xs which doesn't seem to affect the size).
I compiled an empty form application with each switch turned on individually. With Lazarus 0924beta win32, the final binary size will be 11.2MB (no matter which debug options is selected or even if all is selected) ... Phew ...
If all the options is turned off, the final binary size will be 1.08MB ... 10MB for debug info ? Wowzer ...
Now I can skip stripping my final builds ... For those of you who wishes to confirm this :
1. Goto Project -> Compiler Options -> Linking
2. Turn off all debug info options. (Normally -gl is selected as default)
3. Build your binary
4. Check binary app size
5. (Optional) Decide whether you want to upx
Rgds