git: 54ff80e07f3a - stable/13 - nanobsd: default to -j $hw.ncpu
Warner Losh
imp at FreeBSD.org
Wed Jul 21 16:14:11 UTC 2021
The branch stable/13 has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=54ff80e07f3a313b810fb5ea79857f93ec80fcab
commit 54ff80e07f3a313b810fb5ea79857f93ec80fcab
Author: Warner Losh <imp at FreeBSD.org>
AuthorDate: 2021-07-15 22:07:51 +0000
Commit: Warner Losh <imp at FreeBSD.org>
CommitDate: 2021-07-21 16:13:11 +0000
nanobsd: default to -j $hw.ncpu
For paralllel builds, default to using all the CPUs on the system. The
old default of -j 3 was too few.
Sponsored by: Netflix
(cherry picked from commit 7e3a794be3752d21fe760cfb2a38665532c4b6b4)
---
tools/tools/nanobsd/defaults.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/tools/nanobsd/defaults.sh b/tools/tools/nanobsd/defaults.sh
index 7bc74c42170e..77c0e216ec80 100755
--- a/tools/tools/nanobsd/defaults.sh
+++ b/tools/tools/nanobsd/defaults.sh
@@ -67,7 +67,8 @@ NANO_PKG_META_BASE=/var/db
# Make & parallel Make
NANO_MAKE="make"
-NANO_PMAKE="make -j 3"
+NANO_NCPU=$(sysctl -n hw.ncpu)
+NANO_PMAKE="make -j $NANO_NCPU"
# The default name for any image we create.
NANO_IMGNAME="_.disk.full"
@@ -920,6 +921,7 @@ set_defaults_and_export ( ) {
export_var NANO_MAKE_CONF_INSTALL
export_var NANO_MEDIASIZE
export_var NANO_NAME
+ export_var NANO_NCPU
export_var NANO_NEWFS
export_var NANO_OBJ
export_var NANO_PMAKE
More information about the dev-commits-src-all
mailing list