Felipe Monteiro de Carvalho wrote:
The initial size of Lazarus applications is 1,5MB unless smartlinking
fails or is off, then it will be 3MB. Which operating system and
architecture are you using? Which Lazarus/fpc versions?
Debian Linux on x86. Lazarus 0.9.30.4 and FPC 2.6.0 (both built from
source as described), gtk2.
Did you turn smartlinking on? -XX
Yes. I've just wiped and reloaded all source files, tweaked project
options for smartlinking and maximum optimisation, and got a 4Mb binary
which doesn't change in size if I try to strip it. Looking at Lazarus
output I can see fpc invoked with -MObjFPC -Scagi -CX -O3 -XX -vewnhi
-l -oawsbrowser-i386-linux-gtk2 -dLCL -dLCLgtk2
When building FPC I habitually use -O- -gl because of getting decent
backtraces on various platforms.
Should this have extra options to force everything possible in the LCL to be
smartlinkable?
No, AFAIK you don't need to specify anything special for the LCL build
to get down to 1,5MB
I've very carefully avoided all non-standard controls and packages with
the intention that anybody should be able to grab a copy of Lazarus and
rebuild my source. No graphics, no embedded icons or bitmaps, a TreeView
and a ListBox with a splitter between them, custom .ini file handling
and bit of glue code and that's about it.
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus