[llvm-dev] Building with LLVM_PARALLEL_XXX_JOBS

Sedat Dilek via llvm-dev
Thu, 25 Feb 2016 19:08:17 -0000

> Which combination of cmake/ninja versions are you using (latest are
> v3.4.3 and v1.6.0)?
>

With this combination I could reduce build-time down from approx. 3h
down to 01h20m.

$ egrep -i 'jobs|ninja' llvm-build/CMakeCache.txt
//Program used to build from build.ninja files.
CMAKE_MAKE_PROGRAM:FILEPATH=/opt/cmake/bin/ninja
//Define the maximum number of concurrent compilation jobs.
LLVM_PARALLEL_COMPILE_JOBS:STRING=3
//Define the maximum number of concurrent link jobs.
LLVM_PARALLEL_LINK_JOBS:STRING=1
CMAKE_GENERATOR:INTERNAL=Ninja

$ LC_ALL=C ls -alt logs/3.8.0rc3_clang-3-8-0-rc3_cmake-3-4-3_ninja-1-6-0/
total 360
drwxr-xr-x 2 wearefam wearefam   4096 Feb 25 19:58 .
drwxr-xr-x 6 wearefam wearefam   4096 Feb 25 19:58 ..
-rw-r--r-- 1 wearefam wearefam 130196 Feb 25 19:54
install-log_llvm-toolchain-3.8.0rc3.txt
-rw-r--r-- 1 wearefam wearefam 205762 Feb 25 19:51
build-log_llvm-toolchain-3.8.0rc3.txt
-rw-r--r-- 1 wearefam wearefam  14331 Feb 25 18:30
configure-log_llvm-toolchain-3.8.0rc3.txt

$ LC_ALL=C du -s -m llvm* /opt/llvm-toolchain-3.8.0rc3
315     llvm
941     llvm-build
609     /opt/llvm-toolchain-3.8.0rc3

- Sedat -

[1] https://cmake.org/files/v3.5/cmake-3.5.0-rc3-Linux-x86_64.tar.gz