Comment #0 by andrej.mitrovich — 2013-04-07T06:15:57Z
DMD automatically tracks imports and loads all dependent modules that a source module needs. By taking advantage of this we can speed up the build time of a project and simplify the build script. See the discussion[1] in the forums.
-rb will be used to make DMD build all modules which it loads.
-rx will be used to exclude modules or packages which DMD should not build when the -rb switch is present. This will enable fast incremental builds via an external tool such as RDMD, as such a tool will be able to exclude prebuilt modules from being built again by passing the module names via the -rx switch, and passing the object files instead to enable proper linking.
-rx can take a fully-qualified module declaration, or a wildcard, via:
$ dmd -rxfoo.bar
This excludes the module foo.bar
$ dmd -rxfoo.*
This excludes all modules from the package foo.
From a few tests we saw build times improve by 30%. Adding incremental support to RDMD (which needs these new flags) will significantly improve the build times.
[1] : http://forum.dlang.org/thread/[email protected]?page=4#post-kjqe9a:242fdl:241:40digitalmars.com
Comment #1 by andrej.mitrovich — 2013-04-07T07:25:36Z