SCons D support

H. S. Teoh hsteoh at quickfur.ath.cx
Thu May 10 21:11:37 PDT 2012


On Thu, May 10, 2012 at 10:13:53AM +0100, Russel Winder wrote:
[...]
> The dmd tool now works with dmd and gdmd. I have the beginnings of a
> gdc tool which works,
[...]

Just confirmed that the new SCons module works flawlessly with a simple
test program (consisting of two D source files). Here's the SConstruct
file:

	env = Environment()
	env.Program('proj', Split("""
		proj.d
		mod1.d
	"""))

Here's the output from a sample run:

	scons: Reading SConscript files ...
	scons: done reading SConscript files.
	scons: Building targets ...
	gdmd -I. -c -ofmod1.o mod1.d
	gdmd -I. -c -ofproj.o proj.d
	gcc -o proj proj.o mod1.o -lgphobos2 -lpthread -lm -lrt
	scons: done building targets.

It seems that it picked up gdmd from my gdc installation. How do I
instruct it to use another compiler? Use the DC variable in the
Environment?

Anyway, this is REALLY cool. Now I can clean up the big mess in my
existing SConstruct/SConscript files. I'll let you know if I run into
any problems. Thanks!!


T

-- 
If lightning were to ever strike an orchestra, it'd always hit the conductor first.


More information about the Digitalmars-d mailing list