[Lazarus] How to reduce size of lazarus itself?

Bo Berglund bo.berglund at gmail.com
Fri Apr 9 07:51:35 CEST 2021

On Fri, 9 Apr 2021 00:46:53 +0200, Martin Frb via lazarus
<lazarus at lists.lazarus-ide.org> wrote:

>On 08/04/2021 23:24, Bo Berglund via lazarus wrote:
>> I just checked out 2.0.12 on a RaspberryPi4 and built it using my existing fpc
>> 3.2.0.
>> The size of the executable is 271,368,224 bytes, which reduces to 30,127,876
>> after using strip -s on it (takes away all the symbols).
>> Since I am never ever going to be debugging lazarus itself, is there some
>> setting I can use to NOT include the symbols in the first place?
>> I want a lean and fast binary...
>> Obviously since Lazarus rebuilds itself when packages are installed in the IDE,
>> this setting must be part of the installation somehow.
>Settings are taken from Tools > configure build lazarus.
>-O3 -g-
>in there.

So I did this on my RPi4 and it worked fine, the executable is now not in need
of strip -s anymore.

But when I tried to do the same on my Windows Lazarus 2.0.8 it resulted in
Lazarus now starting up with ONLY the code editor window and the top Lazarus bar
All of the other windows I have adjusted around the code editor are gone!
No more Object inspector, Messages, Project Inspector, Code Explorer...

How come they disappeared?

In RPi4 I did this in a newly installed Lazarus where I have not yet opened a
project whereas on the Windows 2.0.8 I did it in Lazarus being in use with a
project loaded (which Lazarus seems always to do).

Bo Berglund
Developer in Sweden

More information about the lazarus mailing list