[Issue 18264] New: Make Phobos buildable on low-memory machines
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jan 18 19:40:52 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18264
Issue ID: 18264
Summary: Make Phobos buildable on low-memory machines
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: enhancement
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: hsteoh at quickfur.ath.cx
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.
--
More information about the Digitalmars-d-bugs
mailing list