Recent

Author Topic: [SOLVED]How to set options for 'Configure "Build Lazarus"'?  (Read 7405 times)

thierrybo

  • Full Member
  • ***
  • Posts: 143
[SOLVED]How to set options for 'Configure "Build Lazarus"'?
« on: August 06, 2009, 12:06:58 am »
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)
« Last Edit: August 07, 2009, 01:14:11 am by thierrybo »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9792
  • Debugger - SynEdit - and more
    • wiki
Re: How to set options for 'Configure "Build Lazarus"'?
« Reply #1 on: August 06, 2009, 12:35:30 am »
Do you *clean* and rebuild *all* of the parts? You may even try the "clean all" checkbox

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Re: How to set options for 'Configure "Build Lazarus"'?
« Reply #2 on: August 06, 2009, 08:51:47 am »
start with -g- to disable all debug information.

thierrybo

  • Full Member
  • ***
  • Posts: 143
Re: How to set options for 'Configure "Build Lazarus"'?
« Reply #3 on: August 07, 2009, 01:13:34 am »
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-
« Last Edit: August 07, 2009, 01:24:01 am by thierrybo »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9792
  • Debugger - SynEdit - and more
    • wiki
Re: [SOLVED]How to set options for 'Configure "Build Lazarus"'?
« Reply #4 on: August 07, 2009, 02:31:00 am »
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

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Re: [SOLVED]How to set options for 'Configure "Build Lazarus"'?
« Reply #5 on: August 07, 2009, 08:02:05 am »
-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

 

TinyPortal © 2005-2018