[fpc-devel] Comparison FPC 2.6.2 - Delphi 7
Hans-Peter Diettrich
DrDiettrich1 at aol.com
Tue Mar 5 12:55:31 CET 2013
Henry Vermaak schrieb:
> I'm trying to ascertain if this is even possible (the c-style,
> file-at-a-time compilation, using make to handle multiple processes).
> Do you think it's possible, then?
Yes and no. It would mean to create kind of header files for the Pascal
units, usable to compile the units independently. No problem at a first
glance, the Interface is the equivalent of an C header file, and the
Uses lists are equivalent to further #includes. One of the remaining
problems are the lost unit qualifiers, so that external references in
the object files cannot be safely resolved.
But in fact above is what FPC already does! When it encounters a Uses
list, it loads the according PPU or, if not available or outdated,
compiles the requested unit. Thus the PPU files already *are* the
equivalent of the C header files. Plus the bonus that every "header" has
to be loaded only once, not for every single module to be compiled by an
C compiler.
The problem IMO is the long list of units waiting for their dependencies
loaded, before the first unit can be compiled at all (top-down). More
efficient were bottom-up compilation, starting with the units with only
few dependencies, so that compilation could start while the disk is
stressed by loading all other PPU files, required for the compilation of
units with more dependencies.
DoDi
More information about the fpc-devel
mailing list