Incremental compilation with DMD

Don nospam at nospam.com
Sun Sep 13 11:49:26 PDT 2009


Walter Bright wrote:
> Tom S wrote:
>> Walter Bright wrote:
>>> What you can try is creating a database that is basically a lib (call 
>>> it A.lib) of all the modules compiled with -lib. Then recompile all 
>>> modules that depend on changed modules in one command, also with 
>>> -lib, call it B.lib. Then for all the obj's in B, replace the 
>>> corresponding ones in A.
>>
>> That's what I'm getting at :)
> 
> With this approach, you could wind up with some 'dead' obj files in 
> A.lib, but aside from a bit of bloat in the lib file, they'll never wind 
> up in the executable.

I'm feeling horribly guilty for having asked for module-level static 
if(). I have a dreadful suspicion that it might have been a profoundly 
bad idea.



More information about the Digitalmars-d mailing list