[PATCH] document parallelism configuration for cmake and ctest
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
Greetings, Thanks for the input on this, but I have to report that CMAKE_BUILD_PARALLEL_LEVEL does not work as expected in my tests, at least for building qtwebengine. It still fails on hosts with a decent number of threads (8, 16, 32) by overallocating RAM. What other ports might be affected by this to test? llvm? clang? Can you duplicate the issue with qtwebengine? Regards, Matt
participants (2)
-
Liu Yubao
-
Matt Housh