dmd -c behaviour doesn't take account of packages.

Bernard Helyer b.helyer at
Wed Feb 22 14:50:53 PST 2012

On Wednesday, 22 February 2012 at 22:44:15 UTC, Jonathan M Davis 
> On Wednesday, February 22, 2012 23:33:57 Bernard Helyer wrote:
>> On Wednesday, 22 February 2012 at 22:05:51 UTC, Jonathan M 
>> Davis
>> wrote:
>> > Then what happens when you have
>> > 
>> > dmc -c foo/a.d foo_a.d
>> Good point.
>> > Regardless, I really wouldn't like the idea of screwing with
>> > the object file
>> > names to try and avoid collisions.
>> Well, the thing is in this case everything is being passed to 
>> the
>> compiler. It knows the names of everything. But yeah, I think
>> complaining is fine _if_ dmd allows individual modules to be
>> named explicitly. Otherwise, all in one is good. But really, 
>> even
>> prefixing it would be better than what we have now. What about
>> 'module.foo_a.o' if foo_a isn't in a package?
> I really think that it should either put it in a single object 
> file or complain
> and disallow it. Really, the correct way to build such modules 
> is to put each
> object file in a directory hierarchy which matches the modules. 
> Anything else
> is a mess. But that's the job a build tool, not the compiler.

Except DMD is faster by a factor of 10 when passing it all at 

More information about the Digitalmars-d mailing list