![](https://secure.gravatar.com/avatar/7ab5ddf90c2ed77adcb28c1c1589a522.jpg?s=120&d=mm&r=g)
Building llvm and clang often get OOM killed because they use ninja which doesn't respect MAKEFLAGS. The two new environment variables benefit all CMake/Ninja based packages, I also committed a patch[1] to Venom Linux to automatically adjust parallel jobs for llvm and clang packages, it's very easy to port to ports/opt.git. [1] https://github.com/venomlinux/ports/pull/4287 --- pkgmk.conf | 2 ++ pkgmk.conf.5.in | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/pkgmk.conf b/pkgmk.conf index e6a8abc8..5063e77e 100644 --- a/pkgmk.conf +++ b/pkgmk.conf @@ -7,6 +7,8 @@ export CXXFLAGS="${CFLAGS}" # export JOBS=$(nproc) # export MAKEFLAGS="-j $JOBS" +# export CMAKE_BUILD_PARALLEL_LEVEL=$JOBS +# export CTEST_PARALLEL_LEVEL=$JOBS case ${PKGMK_ARCH} in "64"|"") diff --git a/pkgmk.conf.5.in b/pkgmk.conf.5.in index 3e054362..bd9c099f 100644 --- a/pkgmk.conf.5.in +++ b/pkgmk.conf.5.in @@ -29,6 +29,16 @@ Set make options. .br Default: none .TP +\fBexport CMAKE_BUILD_PARALLEL_LEVEL='NUMBER'\fP +Set Specifies the maximum number of concurrent processes to use when building using the cmake --build command line Build Tool Mode. +.br +Default: none +.TP +\fBexport CTEST_PARALLEL_LEVEL='NUMBER'\fP +Set Specify the number of tests for CTest to run in parallel. +.br +Default: none +.TP \fBPKGMK_SOURCE_MIRRORS=('STRING')\fP Set mirrors to check and download source archives from. .br -- 2.39.2