diff --git a/debian/changelog b/debian/changelog index 81c99296..0bd65adc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,13 @@ llvm-toolchain-17 (1:17.0.6-2) UNRELEASED; urgency=medium + [ Gianfranco Costamagna ] * Add new cmake-clang-test to spot issues such as Debina bug #1057151 * Fix cmake file (Closes: #1057151) + [ Matthias Klose ] + * Also use the free swap to determine the number of parallel processes. + -- Gianfranco Costamagna Fri, 01 Dec 2023 10:50:00 +0100 llvm-toolchain-17 (1:17.0.6-1) unstable; urgency=medium diff --git a/debian/rules b/debian/rules index aadfed07..680c2fa0 100755 --- a/debian/rules +++ b/debian/rules @@ -53,7 +53,7 @@ ifneq (,$(filter flang-$(LLVM_VERSION), $(packages))) else MEM_PER_CPU=2100 endif -NJOBS := $(shell mt=`awk '/^MemTotal/ { print $$2 }' /proc/meminfo`; \ +NJOBS := $(shell mt=`awk '/^(MemAvail|SwapFree)/ { mt += $$2 } END {print mt}' /proc/meminfo`; \ awk -vn=$(NCPUS) -vmt=$$mt -vm=$(MEM_PER_CPU) \ 'END { mt/=1024; n2 = int(mt/m); print n==1 ? 1 : n2