llvm/clang compile error with Memory exhausted
You need to do one of the following:
- Add more RAM to your VM, or
- Use gold instead of ld as a linker, or
- Build Release(-DCMAKE_BUILD_TYPE=Release), not Debug build
Another consideration: If you have Make running parallel jobs (e.g., make -j8
), the concurrently executing jobs may require too much memory.