3 ms·
How it works with D is you can do separate compilation: dmd -c a.d dmd -c b.d dmd a.o b.o or do it all in one go: dmd a.d b.d Over time, the
by WalterBright 3y ago
How it works with D is you can do separate compilation:
dmd -c a.d
dmd -c b.d
dmd a.o b.o
or do it all in one go:
dmd a.d b.d
Over time, the latter became the preferred method. With it, the compiler generates one large .o file for a.d and b.d, more or less creating a "pre-linked" object file. This also means lots of inlining opportunities are present without needing linker support for intermodule inlining.