1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-18 13:38:12 +00:00

build(core): use the right number of jobs

This commit is contained in:
matejcik 2023-11-03 14:13:55 +01:00 committed by matejcik
parent 66213823ea
commit 1d6fafa0ff

View File

@ -1,6 +1,12 @@
.PHONY: vendor .PHONY: vendor
JOBS = 4 # get the number of CPU cores in a "portable" manner
# (accounting for darwin and big.LITTLE archs)
JOBS = $(shell sysctl -n hw.perflevel0.physicalcpu 2>/dev/null ||\
sysctl -n hw.physicalcpu 2>/dev/null ||\
sysctl -n hw.ncpu 2>/dev/null ||\
nproc 2>/dev/null ||\
echo 4)
MAKE = make -j $(JOBS) MAKE = make -j $(JOBS)
SCONS = scons -Q -j $(JOBS) SCONS = scons -Q -j $(JOBS)