Bug 18264 – Make Phobos buildable on low-memory machines

Status
NEW
Severity
enhancement
Priority
P4
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2018-01-18T19:40:52Z
Last change time
2024-12-01T16:32:05Z
Assigned to
No Owner
Creator
hsteoh
Moved to GitHub: phobos#10294 →

Comments

Comment #0 by hsteoh — 2018-01-18T19:40:52Z
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
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/10294 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB