SCons D support

Russel Winder russel at winder.org.uk
Thu May 10 23:46:18 PDT 2012


On Thu, 2012-05-10 at 22:27 -0700, H. S. Teoh wrote:
> On Thu, May 10, 2012 at 10:13:53AM +0100, Russel Winder wrote:
> [...]
> > The dmd tool now works with dmd and gdmd.
> [...]
> 
> After playing around a bit more, and looking at your code a bit more
> carefully, now I'm wondering what's the correct way to specify a custom
> path to DMD?

Currently I just set ENV=os.environ in the environment so that the dmd
tool finds dmd before it finds gdmd.

> It seems that specifying DC='/path/to/dmd' doesn't work properly,
> because the tool tries to auto-detect gdmd and dmd, and if gdmd is found
> first, it will assume a gdc installation and attempt to link with
> -lgphobos2.  Thence, changing DC manually does not change this
> assumption, and as a result things will break when it tries to link dmd
> objects with libgphobos2 instead of libphobos2.

Clearly there are problems with the way in which libraries are added and
the way in which the smart linking is happening. Need some test cases!
SCons doesn't do unit tests for tools (not really much point for genuine
reasons), but it does rely on system tests for tools. So a test is a
tiny project (source plus SCons files) that makes use of a feature. I'll
see what I can do but feel free to ship me any and all test cases you
think would add to coverage and I'll add them in. 

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder at ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20120511/875f30e1/attachment.pgp>


More information about the Digitalmars-d mailing list