On the performance of building D programs

Andrej Mitrovic andrej.mitrovich at gmail.com
Fri Apr 5 04:29:06 PDT 2013


On 4/5/13, Vladimir Panteleev <vladimir at thecybershadow.net> wrote:
> I think -r is redundant, and should be the default action if only
> one module is given on DMD's command line. I can't think of
> plausible situations where this could be a problem.

$ dmd main.d foo.obj

If main has imports to 'foo', how will DMD know whether or not to
compile foo.d or just link with foo.obj?

You could pass -rxfoo, but you'd still be breaking all existing build
scripts which rely on non-recursive building.

> Considering that you can't have a module with the same name as a
> package, the same syntax for excluding both can be used, e.g.
> "-rxcrc32 -rxstd".

I guess it could work. But I'm hoping one day we'll be able to lift
that restriction, it's quite a pain in the ass when porting C++ code
that uses namespaces to D. So for future-compatibility I thought
separating module and package switches might be nice. It's not a big
deal though.


More information about the Digitalmars-d mailing list