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

This commit is contained in:
Matthias Klose 2023-12-01 19:13:33 +01:00
parent 6297fd36b2
commit 34ed134da1
2 changed files with 2 additions and 1 deletions

1
debian/changelog vendored
View File

@ -18,6 +18,7 @@ llvm-toolchain-snapshot (1:18~++20230921012857+4cf8da94198d-1~exp1) UNRELEASED;
* libclang1-18: Only encode the major version in the soname. See #1056126.
* Restore the patch for D148945, searching /usr/lib/llvm-18/lib by default.
Addresses: #1056580.
* Also use the free swap to determine the number of parallel processes.
[ John Paul Adrian Glaubitz ]
* Don't install *clang_rt* on sparc and sparc64

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)