Currently, Phobos can't be built on low-memory Linux systems because compiling every Phobos module on a single command-line causes dmd to soak up all memory and invoke the dreaded kernel OOM killer. (The system tested on has 1GB memory. Not a lot, but not meager either.)
I managed to build Phobos by splitting that large compile command into smaller chunks, basically by compiling 1/3 of Phobos into libphobos2-part1.a, then another 1/3 into libphobos2-part2.a, then another into libphobos2-part3.a, then a final link with druntime and the C object files to link everything together into libphobos2.a.
While this may not be representative usage, it would be very nice to provide the option to compile Phobos this way in posix.mak.
See also issue #10906, which was partly alleviated, but ultimately doesn't solve the fundamental problem that asking dmd to compile the entirety of Phobos all at once causes extreme memory usage.
Comment #1 by robert.schadek — 2024-12-01T16:32:05Z