[fpc-devel] Delphi smart-linking perspective ( Language change and implementation ... )

Marco van de Voort marcov at stack.nl
Sun May 31 10:38:50 CEST 2009

In our previous episode, Jonas Maebe said:
> > Inoussa OUEDRAOGO wrote:
> >> Hi
> >> At http://blogs.embarcadero.com/abauer/2009/05/29/38888
> >> This could drastically reduce Lazarus executable size.
> > Doubt that. Just another feature ported from .NET,
> I don't think it is very specific to .NET. We use similar techniques  
> for e.g. cthreads and cwstring under Unix. And I also used it in the  
> fix for http://bugs.freepascal.org/view.php?id=12704

That is explicit, we add a unit. The above article, code only links in when
you actually use it. There is a gradual difference.

IMHO it is a pity it works on class and not unit level though.
> > Besides, FPC already has the WPO.
> WPO can sometimes help a little in such situations, but not very much.
> > Has anyone tried it on Lazarus?
> Yes, the but the results are not very impressive. The reason is due to  
> the way the LCL is constructed, almost every declared class can  
> theoretically be instantiated. On the other hand, I read that recently  
> the LCL was restructured a bit to improve the situation, so maybe the  
> results would be better now.
> Also note that WPO can do little about published methods (since it  
> must assume that these can all be called via RTTI).

Note that future Delphi versions are rumoured to up the RTTI. There is not
much detail knowledge about that yet though, so I hope it will be very

More information about the fpc-devel mailing list