* Also use the free swap to determine the number of parallel processes.

This commit is contained in:
Matthias Klose 2023-12-01 19:11:33 +01:00
parent 83ad62f9cf
commit e6bb61d217
2 changed files with 5 additions and 1 deletions

4
debian/changelog vendored
View File

@ -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 <locutusofborg@debian.org> Fri, 01 Dec 2023 10:50:00 +0100
llvm-toolchain-17 (1:17.0.6-1) unstable; urgency=medium

2
debian/rules vendored
View File

@ -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<n+1 ? n2 : n+1}' < /dev/null)