LacaK via fpc-pascal <fpc-pascal@lists.freepascal.org> schrieb am Sa., 3.
Apr. 2021, 13:22:

> Hi,
> I did small test project for library:
> (with -CX -WR -O3 -Xs -XX options set)
>
> library library1;
> {$mode objfpc}{$H+}
> uses
>   SysUtils, Classes;
> begin
> end.
>
> Compilation produces DLL with size 200+ KB.
>
> When in uses is only SysUtils then size is under 100 KB.
> Whene there are not units in uses clause then size is under 40 K B.
>
> I am guessing, that there must be something in initialization sections of
> units (SysUtils and Classes), which cause that some code is included, right?
> Can I somehow to avoid this grow of size (for example I need from Classes
> only TFPList)?
>

Everything that is touched by initialization or finalization sections, even
if nothing else is used, will be included.

Regards,
Sven

>
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to