www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18264] New: Make Phobos buildable on low-memory machines


          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 puremagic.com
          Reporter: hsteoh 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.

solve the fundamental problem that asking dmd to compile the entirety of Phobos
all at once causes extreme memory usage.

Jan 18 2018