[cfe-dev] Building clang

denis gantsev via cfe-dev cfe-dev at lists.llvm.org
Sat Aug 15 13:23:02 PDT 2020


Hi
Thanks to everyone, indeed, using "-DLLVM_PARALLEL_LINK_JOBS=1
-DLLVM_USE_LINKER=gold -DLLVM_TARGETS_TO_BUILD=X86", actually worked!
P.S I had to turn off swap completely, because I prefer process being
killed than my laptop being unusable

Thanks again
Regards
Denis

On Sat, 15 Aug 2020 at 19:22, David Blaikie <dblaikie at gmail.com> wrote:

> GNU ld probably is a bit of a bottleneck here - try gold or lld if you can.
>
> But also what Dimitry said - about reducing the number of link steps.
> Also depends if you build with debug info - that adds a lot. Using
> Split DWARF can help ease that a bit.
>
> On Sat, Aug 15, 2020 at 3:28 AM denis gantsev via cfe-dev
> <cfe-dev at lists.llvm.org> wrote:
> >
> > Hi,
> > I wanted to play with clang, and was trying to build it according to
> instructions (https://clang.llvm.org/get_started.html), with GCC 5.5 and
> GNU ld 2.26.1, running my linux 5.6.7.
> >
> > However, the build regularly fails, running out of memory (my laptop has
> 12Gb RAM). I tried with both "Unix Makefiles" and "Ninja 1.7.1". I did
> specify explicitly "DLLVM_ENABLE_PROJECTS=clang".
> >
> > Is it expected to consume that much memory during build?
> >
> > Regards,
> > Denis
> > _______________________________________________
> > cfe-dev mailing list
> > cfe-dev at lists.llvm.org
> > https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20200815/a20787d2/attachment.html>


More information about the cfe-dev mailing list