[llvm-dev] Recommended computer resources to build llvm

Mehdi Amini via llvm-dev
Wed, 07 Sep 2016 04:05:03 -0000

> On Sep 6, 2016, at 8:39 PM, Pranith Kumar via llvm-dev <llvm-dev at
lists.llvm.org> wrote:
>
> On Tue, Sep 6, 2016 at 5:54 PM, Wink Saville via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
>> I've got a i7 with 12 logical cores and 16GB of RAM I successfully
>> built RELEASE_390/final but for the last 100 or so files I'd to use
>> "ninja -j2" so as not to keep from swapping in the best case
and and
>> in the worst case the build kills itself without completing because
>> apparently its run out of memory.
>>
>
> Can you try the latest master branch? That has thinLTO enabled and
> does not need more than 6 GB.

I’m not sure why ThinLTO would be a solution here: the original post does not
even mention LTO and I’d expect ThinLTO to consume strictly more memory than a
non-LTO build.
Also ThinLTO is not enabled by default for -flto.

In general, LLVM builds a lot of binaries from the same intermediate object
files, which is not a favorable use-case for ThinLTO.

Using Gold and reducing the number of parallel link is probably more promising.
—
Mehdi