Feature suggestion: separate compilation of source files.

Nathan Petrelli npetrelli at klassmaster.com
Thu Apr 19 12:02:30 PDT 2007


Hello Walter.

With respect to the dependency injection issue, would it be possible to add a switch to DMD so all files passed where treated as if they where the only file passed on the command line?

I'd like to describe our current situation and why we think this switch would be a good idea.

Our government publishes a standard that defines the file format in which some data files should be delivered to them. We use an automated tool to generate a DOM that implements the standard and provides validation capabilities.

The code generated is around 8MB which compiled in about 30 secs when all files are passed to DMD at once. Since we started experiencing similar problems as the Tango project we changed our build scripts to compile each file separately. At this time our build times went up to 6 minutes.

A new standard has been published with more than double the number of entities, rules, data tables, etc.. and our development branch grew to around 18MB and the build time to around 15mins.

Of course, if our code base where written in C++ build times would be of hours so it's not really that bad.

But not only our code base grew, our build scripts are a lot longer and difficult to maintain since there are at least 1 line per file when before it was like three lines that built all of them.

Our project it's used in several applications in the company so we can't actually change the build process right now. It would force all other teams to re-tool their PCs.

Maybe you could help us out by adding a switch that would allow us to pass all files at once and include all symbols in the .obj file no matter if it's already defined in other .objs?


Thanks.



More information about the Digitalmars-d mailing list