On Wednesday, 11 November 2015 at 14:15:54 UTC, Johannes Pfau wrote:
And where do you draw the line? Do we expect ARM users to have 4GB of RAM to compile phobos? Is 512MB enough? 64 MB? Even huge C++ codebases such as GCC compile with 128MB memory.

OK let's clarify the terminology first.

separate compilation: -c single_source.d
incremental compilation: -c source_a.d source_b.d (as well as -c -ofsingle.o source_a.d source_b.d)
library compilation: -lib all_pkg_sources

Separate compilation works fine (and predictable) but is slow (due to reparsing), you do need to link all objects from all your sources though.
Choosing this strategy makes sense to mitigate OOM issues.

Incremental compilation doesn't work b/c templates are easily emitted into different objects, causing all sorts of linker errors. It works somewhat when you delete all objects and recompile all of them.

Library compilation works and recompiles a whole library whenever something changes.
It's fast b/c modules/semantic can be reused by the compiler.
Choose this strategy unless your running into OOM issues.

Reply via email to