[llvm-dev] llvm-dwp

Tim Northover via llvm-dev llvm-dev at lists.llvm.org
Thu Mar 10 20:45:19 PST 2016


Hi,

> It  used out of the system memory( > 4 G ) and continue, without any sign of stop, to used the swap filesystem.

This is pretty normal for a debug build. If you're on Linux, the
ld.gold linker is much more efficient than ld.bfd so switching to that
may help (how you do it is distribution-dependent).

Reducing the number of parallel threads can also help significantly.
The blunt hammer is "make -j1" or "ninja -j1" (1 is probably too
conservative, but is a starting point). If you're using ninja as the
build system, you can set CMake's LLVM_PARALLEL_LINK_JOBS variable to
limit just the memory-intensive linking phase.

But 4GB is pushing the limits either way. LLVM is a big project and
it's quite possible to hit swap with even 16GB of RAM.

Cheers.

Tim.


More information about the llvm-dev mailing list