www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Build all at once =?UTF-8?Q?or=E2=80=A6?=

reply Russel Winder <russel winder.org.uk> writes:
There seems a dichotomy between "explicitly compile each d file (aka
module) and then link" versus "compile all the files (aka modules) at
once" especially since the objects for each file/module are created in
both cases.

I am assuming there are also some DMD/GDC/LDC2 differences as well.

Currently Dub is "compile all source at once" and SCons is "compile each
file individually and then link" (though I am currently using SCons in a
"compile all source at once" as an experiment to see what needs to
happen to the SCons D build support.

Is there some critical feature which means that "compile all source at
once" is a better route?

--=20
Russel.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder ekiga.n=
et
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
Dec 22 2013
parent "Dicebot" <public dicebot.lv> writes:
On Sunday, 22 December 2013 at 08:21:47 UTC, Russel Winder wrote:
 Is there some critical feature which means that "compile all 
 source at
 once" is a better route?
It is much faster if you have enough memory to afford it (imports are no re-parsed). Also there have been some nasty symbol emitting bugs in separate compilation mode but those should be fixed by now (though I won't swear it)
Dec 22 2013