<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 19 Jun 2019 at 23:36, nick via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Greetings, <br>
<br>
Seems I'm running out of memory on a host system trying to build llvm, tooling and clang. It was configured<br>
as:<br>
cmake -DLLVM_ENABLE_PROJECTS=clang -G "Unix Makefiles" ../llvm<br>
<br>
and build with:<br>
<br>
make -j4 using gcc as the host compiler, version 8.<br>
<br>
The dmesg I'm getting is related to the linker and not sure if the linker has a bug or it's normal<br>
to expect 3GB or more used for linking clang. Doesn't seem to be but not sure.<br>
<br>
dmesg output:<br>
[186517.023397] Out of memory: Kill process 2143 (ld) score 286 or sacrifice child<br>
[186517.023403] Killed process 2143 (ld) total-vm:4622188kB, anon-rss:3202188kB, file-rss:4kB, shmem-rss:0kB<br>
<br>
<br></blockquote><div><br></div><div>HI,</div><div><br></div><div>I have a 16 Core/32 Thread system with 32GB RAM, and it can have difficulty building CLANG/LLVM.</div><div>The link stage definitely needs to be with make -j1.</div><div><br></div><div>That being said, if you force a "Release" version, and not the "Debug" version, much less RAM is needed.</div><div><br></div><div>Kind Regards</div><div><br></div><div>James</div><div><br></div><div> <br></div></div></div>