[llvm-dev] Recommended computer resources to build llvm

Wink Saville via llvm-dev llvm-dev at lists.llvm.org
Tue Sep 6 16:04:15 PDT 2016


So with this cmake command line:

$ cmake -G Ninja .. -DCMAKE_INSTALL_PREFIX=/home/wink/opt/llvm
-DLLVM_PARALLEL_LINK_JOBS=2

And then running the build with "time ninja" took 21min:

$ time ninja
...
[3345/3481] Building C object
tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/metadata.c.o
In file included from ../tools/llvm-c-test/llvm-c-test.h:17:0,
                 from ../tools/llvm-c-test/metadata.c:15:
../include/llvm-c/Core.h:83:23: warning: enumerator value for
‘LLVMNonLazyBind’ is not an integer constant expression [-Wpedantic]
     LLVMNonLazyBind = 1 << 31
                       ^
[3481/3481] Linking CXX executable bin/opt

real 20m57.995s
user 182m51.022s
sys 7m36.690s


For maybe 20 seconds 100% of RAM was used while compiling
and then twice during linking it was 95-98% so overall not to bad.
I'm now going to try "time ninja check-all" I'll report back what happens.

Thanks everyone for the assistance!!!

-- Wink

On Tue, Sep 6, 2016 at 3:56 PM, Wink Saville <wink at saville.com> wrote:
> I'll give it a try on the next build, txs again.
>
> On Tue, Sep 6, 2016 at 3:37 PM, Alexandre Isoard
> <alexandre.isoard at gmail.com> wrote:
>> And again...
>> LLVM_BUILD_LLVM_DYLIB:BOOL=ON
>> LLVM_LINK_LLVM_DYLIB:BOOL=ON
>>
>> This one is the good one... maybe.
>>
>> On Tue, Sep 6, 2016 at 11:35 PM, Alexandre Isoard
>> <alexandre.isoard at gmail.com> wrote:
>>>
>>> That is because I mistyped it:
>>> LLVM_ENABLE_LLVM_DYLIB:BOOL=ON
>>> LLVM_LINK_LLVM_DYLIB:BOOL=ON
>>>
>>> On Tue, Sep 6, 2016 at 11:31 PM, Wink Saville <wink at saville.com> wrote:
>>>>
>>>> On Tue, Sep 6, 2016 at 3:05 PM, Alexandre Isoard
>>>> <alexandre.isoard at gmail.com> wrote:
>>>> > LLVM_ENABLE_DYLIB
>>>>
>>>> Where/when/how do you specify LLVM_ENABLE_DYLIB and LLVM_LINK_DYLIB?
>>>>
>>>> I tried the following on the cmake command line:
>>>>
>>>> $ cmake -G Ninja .. -DCMAKE_INSTALL_PREFIX=/home/wink/opt/llvm
>>>> -DLLVM_ENABLE_DYLIB=true -DLLVM_LINK_DYLIB=true
>>>>
>>>>
>>>> And got:
>>>> ...
>>>> -- Performing Test CXX_SUPPORTS_NO_NESTED_ANON_TYPES_FLAG - Failed
>>>> -- Configuring done
>>>> -- Generating done
>>>> CMake Warning:
>>>>   Manually-specified variables were not used by the project:
>>>>
>>>>     LLVM_ENABLE_DYLIB
>>>>     LLVM_LINK_DYLIB
>>>>
>>>>
>>>> -- Build files have been written to: /home/wink/foss/llvm.3.9.0/build
>>>
>>>
>>>
>>>
>>> --
>>> Alexandre Isoard
>>
>>
>>
>>
>> --
>> Alexandre Isoard


More information about the llvm-dev mailing list