[SOLVED]How to set options for 'Configure "Build Lazarus"'? lazarus / 11-Options ---------------------------------------------------------------------- thierrybo · 2009-08-05 22:06 Hi, I would like to build lazarus so that lazarus binary being already small (without having to manually strip), but whatever I enter in this field, the resulting binary never change size. What is the proper way to fill this field? (currently I entered -O2 -Or -Os -CX -Xs -XX -WG) ---------------------------------------------------------------------- Martin_fr · 2009-08-05 22:35 Do you *clean* and rebuild *all* of the parts? You may even try the "clean all" checkbox ---------------------------------------------------------------------- Vincent Snijders · 2009-08-06 06:51 start with -g- to disable all debug information. ---------------------------------------------------------------------- thierrybo · 2009-08-06 23:13 Thanks a lot! In the attached image, the only difference is your -g- . Now lazarus.exe is only 8.88Mb, without it is 82.3 Mb (~ 10/11 Mb after --strip-all). So without -g-, other directives are not used? Edit : I just tried with -g- ONLY, no other options, and I get 8.88Mb too  so other are not used? I was not aware of option -g- ---------------------------------------------------------------------- Martin_fr · 2009-08-07 00:31 The screenshot looks correct to me. Smartlinking the IDE probably will not gain anything, because  the IDE uses every single Component anyway, so nonthing can be smart-linked away. Compiling the LCL for smart-linking, may save space in your own apps AFAIK using -Os and -O2 together seems to make little sense, one says speed over size, the other says size over speed.... Anyway IIRC in many cases -Os does not save very much anyway ---------------------------------------------------------------------- Vincent Snijders · 2009-08-07 06:02 -Or is obsolete, it should be -Oregvar IIRC. -O2 is already added in fpc.cfg -CX -XX are enabled by default in the compiler for win32. If you do -g- no debug information is generated, so it doesn't need to be stripped (-Xs), if other pre-compiled units (like your RTL ) are not compiled with debug info