<div dir="ltr"><div dir="auto">Hello,<div dir="auto"><br></div><div dir="auto">I am willing to work on changing the defaults reducing memory for build. Do you have a link for discussion about the agreement?</div><div dir="auto">I am just looking for pointers - as I am pretty much inexperienced with llvm compilation - that could be checked out for finding better defaults. Regardless I am going to check out things mentioned in this thread.</div><div dir="auto"><br></div><div dir="auto">--</div><div>Kokan</div><div dir="auto"></div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 2 Jan 2020, 10:12 pm Reid Kleckner via llvm-dev, <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">The last time this came up, we agreed something should be done to fix the defaults, but nobody picked it up and ran with it. I think there was consensus, it just needs legwork now.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 2, 2020 at 11:58 AM Aaron Smith via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" rel="noreferrer" target="_blank">llvm-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">There was a recent thread on reducing memory:<br>
<a href="http://lists.llvm.org/pipermail/llvm-dev/2019-June/thread.html#133215" rel="noreferrer noreferrer" target="_blank">http://lists.llvm.org/pipermail/llvm-dev/2019-June/thread.html#133215</a><br>
<br>
On Thu, Jan 2, 2020 at 11:24 AM David Blaikie via llvm-dev<br>
<<a href="mailto:llvm-dev@lists.llvm.org" rel="noreferrer" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
><br>
> Various options for reducing memory usage when building LLVM:<br>
> * Don't use bfd-ld, at least use gold, probably use lld if you have it available<br>
> * With Ninja and/or CMake there's some way to specify the maximum number of concurrent linkactions - lower this to fit in your available memory<br>
> * If you're building with debug info: Use Split DWARF<br>
><br>
><br>
> On Thu, Jan 2, 2020 at 5:21 AM Kókai Péter via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" rel="noreferrer" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
>><br>
>> Hello,<br>
>><br>
>> I cannot tell you if this is due to ram, but I had ram issue with 32<br>
>> GB + 16 core when build with default options (clang was around 1 GB<br>
>> binary), you could try to enable shared libraries(BUILD_SHARED_LIBS).<br>
>> In that case I did not run into out of memory kind of issues.<br>
>><br>
>> --<br>
>> Kokan<br>
>><br>
>> On Thu, 2 Jan 2020 at 14:14, Priyanka Panigrahi via llvm-dev<br>
>> <<a href="mailto:llvm-dev@lists.llvm.org" rel="noreferrer" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
>> ><br>
>> > hello,<br>
>> ><br>
>> > I am trying to build LLVM with default options. I am getting the following error message after make.<br>
>> ><br>
>> > [100%] Building C object tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/metadata.c.o<br>
>> > [100%] Building C object tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/module.c.o<br>
>> > [100%] Building C object tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/object.c.o<br>
>> > [100%] Building C object tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/targets.c.o<br>
>> > [100%] Linking CXX executable ../../bin/llvm-c-test<br>
>> > clang: error: unable to execute command: Killed<br>
>> > clang: error: linker command failed due to signal (use -v to see invocation)<br>
>> > tools/llvm-lto/CMakeFiles/llvm-lto.dir/build.make:211: recipe for target 'bin/llvm-lto' failed<br>
>> > make[2]: *** [bin/llvm-lto] Error 254<br>
>> > CMakeFiles/Makefile2:21155: recipe for target 'tools/llvm-lto/CMakeFiles/llvm-lto.dir/all' failed<br>
>> > make[1]: *** [tools/llvm-lto/CMakeFiles/llvm-lto.dir/all] Error 2<br>
>> > [100%] Built target llvm-lipo<br>
>> > clang: error: unable to execute command: Killed<br>
>> > clang: error: linker command failed due to signal (use -v to see invocation)<br>
>> > tools/llc/CMakeFiles/llc.dir/build.make:212: recipe for target 'bin/llc' failed<br>
>> > make[2]: *** [bin/llc] Error 254<br>
>> > CMakeFiles/Makefile2:22024: recipe for target 'tools/llc/CMakeFiles/llc.dir/all' failed<br>
>> > make[1]: *** [tools/llc/CMakeFiles/llc.dir/all] Error 2<br>
>> > clang: error: unable to execute command: Killed<br>
>> > clang: error: linker command failed due to signal (use -v to see invocation)<br>
>> > tools/dsymutil/CMakeFiles/dsymutil.dir/build.make:476: recipe for target 'bin/dsymutil' failed<br>
>> > make[2]: *** [bin/dsymutil] Error 254<br>
>> > CMakeFiles/Makefile2:21803: recipe for target 'tools/dsymutil/CMakeFiles/dsymutil.dir/all' failed<br>
>> > make[1]: *** [tools/dsymutil/CMakeFiles/dsymutil.dir/all] Error 2<br>
>> > clang: error: unable to execute command: Killed<br>
>> > clang: error: linker command failed due to signal (use -v to see invocation)<br>
>> > tools/llvm-dwp/CMakeFiles/llvm-dwp.dir/build.make:230: recipe for target 'bin/llvm-dwp' failed<br>
>> > make[2]: *** [bin/llvm-dwp] Error 254<br>
>> > CMakeFiles/Makefile2:24606: recipe for target 'tools/llvm-dwp/CMakeFiles/llvm-dwp.dir/all' failed<br>
>> > make[1]: *** [tools/llvm-dwp/CMakeFiles/llvm-dwp.dir/all] Error 2<br>
>> > clang: error: unable to execute command: Killed<br>
>> > clang: error: linker command failed due to signal (use -v to see invocation)<br>
>> > tools/llvm-lto2/CMakeFiles/llvm-lto2.dir/build.make:210: recipe for target 'bin/llvm-lto2' failed<br>
>> > make[2]: *** [bin/llvm-lto2] Error 254<br>
>> > CMakeFiles/Makefile2:26436: recipe for target 'tools/llvm-lto2/CMakeFiles/llvm-lto2.dir/all' failed<br>
>> > make[1]: *** [tools/llvm-lto2/CMakeFiles/llvm-lto2.dir/all] Error 2<br>
>> > [100%] Built target lli<br>
>> > clang: error: unable to execute command: Killed<br>
>> > clang: error: linker command failed due to signal (use -v to see invocation)<br>
>> > tools/llvm-isel-fuzzer/CMakeFiles/llvm-isel-fuzzer.dir/build.make:238: recipe for target 'bin/llvm-isel-fuzzer' failed<br>
>> > make[2]: *** [bin/llvm-isel-fuzzer] Error 254<br>
>> > CMakeFiles/Makefile2:25580: recipe for target 'tools/llvm-isel-fuzzer/CMakeFiles/llvm-isel-fuzzer.dir/all' failed<br>
>> > make[1]: *** [tools/llvm-isel-fuzzer/CMakeFiles/llvm-isel-fuzzer.dir/all] Error 2<br>
>> > [100%] Built target llvm-opt-fuzzer<br>
>> > [100%] Built target llvm-c-test<br>
>> > [100%] Built target LTO<br>
>> > Makefile:151: recipe for target 'all' failed<br>
>> > make: *** [all] Error 2<br>
>> ><br>
>> > Is it because of RAM? I am trying to build in a 16GB RAM, 12 core processor.<br>
>> > Can anyone please help what am I missing?<br>
>> ><br>
>> > Thank you for your time.<br>
>> ><br>
>> > Priyanka<br>
>> > _______________________________________________<br>
>> > LLVM Developers mailing list<br>
>> > <a href="mailto:llvm-dev@lists.llvm.org" rel="noreferrer" target="_blank">llvm-dev@lists.llvm.org</a><br>
>> > <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
>> _______________________________________________<br>
>> LLVM Developers mailing list<br>
>> <a href="mailto:llvm-dev@lists.llvm.org" rel="noreferrer" target="_blank">llvm-dev@lists.llvm.org</a><br>
>> <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
><br>
> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:llvm-dev@lists.llvm.org" rel="noreferrer" target="_blank">llvm-dev@lists.llvm.org</a><br>
> <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" rel="noreferrer" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" rel="noreferrer" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div></div>
</div>