<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi,<div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Feb 14, 2021, at 13:15, Manas via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hi everyone,<br class=""><br class="">I fairly regularly build LLVM (a forked up-to-date repo containing some<br class="">custom LLVM passes). But when the build is large, it takes up almost all of <br class="">my remaining RAM (~4 to 5 gigs). I usually run those builds at nights for it<br class="">to complete.<br class=""><br class="">Though I would like the build to not clog up entire RAM and just use some <br class="">portion of it, so that I can also work alongside (and my system won't<br class="">freeze). My current CMAKE command is:<br class=""><br class="">```<br class="">cmake -G Ninja -DLLVM_TARGETS_TO_BUILD="X86;AMDGPU" \<br class="">    -DLLVM_ENABLE_ASSERTIONS=ON \<br class="">    -DCMAKE_C_COMPILER=/usr/bin/clang \<br class="">    -DCMAKE_CXX_COMPILER=/usr/bin/clang++ \<br class="">    -DCMAKE_BUILD_TYPE=Debug \<br class="">    -DLLVM_CCACHE_BUILD=ON \<br class="">    -DLLVM_USE_LINKER=gold \<br class="">    -DCMAKE_EXPORT_COMPILE_COMMANDS=1 \<br class="">    ../llvm/<br class="">```<br class=""></div></div></blockquote></div></div><br class=""><div class="">Building llvm with debug info requires a large amount of RAM. See <a href="https://llvm.org/docs/GettingStarted.html#common-problems" class="">https://llvm.org/docs/GettingStarted.html#common-problems</a> for some pointers.</div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">Florian</div><div class=""><br class=""></div></body></html>