October 30, 2012
On Tue, Oct 30, 2012 at 09:18:28AM +0000, Russel Winder wrote:
> On Tue, 2012-10-23 at 14:58 -0700, H. S. Teoh wrote:
> […]
> > Well, dmd tends to work best when given the full list of D files, as opposed to the C/C++ custom of per-file compilation. (It's also faster that way---significantly so.) The -op flag is your friend when it comes to using dmd with multi-folder projects.
> > 
> > And I just tried: gdc works with multiple files too. I'm not sure how well it handles a full list of D files, though, if some of those files may not necessarily be real dependencies.
> 
> So perhaps the D tooling for SCons should move more towards the Java approach than the C/C++/Fortran approach, i.e. a compilation step is a single one depending only on source files and generating a known set of outputs (which is easier than Java since it can generate an almost untold number of output files, Scala is even worse).
[...]

That's not a bad idea. I also noticed that gdc tends to produce smaller executables when compiling in this way (I'm not sure why -- are identical template instances not getting merged when compiling separately?).


T

-- 
GEEK = Gatherer of Extremely Enlightening Knowledge
October 31, 2012
On Tue, 2012-10-30 at 09:53 -0700, H. S. Teoh wrote:
[…]
> That's not a bad idea. I also noticed that gdc tends to produce smaller executables when compiling in this way (I'm not sure why -- are identical template instances not getting merged when compiling separately?).

Is it fair to assume that DMD, LDC, and GDC all have the same behaviour in this respect?

-- 
Russel. ============================================================================= Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder@ekiga.net 41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel@winder.org.uk London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder