On 9/19/2014 10:34 AM, Scott Wilson wrote:
I tried this
dmd test.d test2.d
Got one test.o and one binary test. No test2.o. Must be that thing where all
modules compiled are smashed. The first filename dictates the .o name. Correct?
Also tried
dmd -c test.d test2.d
In that case yes both .o are generated.
Yes, that's correct. When building an exe directly, there's no point in
generating multiple .o files, so only one is generated.
So the trick with all this is how to opt between building all and building each
incrementally. Any tools helping with that? For example tool that shows
dependencies. If some files are dependent on each other they better be compiled
together anyway.
The -deps switch for dmd will list dependencies.