SCons and gdc

H. S. Teoh hsteoh at quickfur.ath.cx
Tue Oct 30 09:53:04 PDT 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


More information about the Digitalmars-d mailing list