[fpc-devel]Some idea of joint units
Peter Vreman
peter at freepascal.org
Thu Nov 13 18:22:54 CET 2003
>> But first there is smartlinking, second
>> there could be "smartuniting"
>
> Impossible, you can't have the compiler remove a unit just because nothing
> from it is used, the unit could contain an object that only registers
> itself
> with a factory on initialization, thus nothing from the unit is ever
> accessed directly, but removing the unit would seriously impact the
> program.
The compiler knows if the unit contains initialization/finalization. See
the unused unit hint already supported (try 1.9.x because 1.0.x is broken
with this support).
But initialization can also have negativ sides. Let say the RTL is
included in a single package/unit. Then all programs depend on the graph
unit (and under linux svgalib.so) because it has an initialization
section. How to solve that?
More information about the fpc-devel
mailing list