git: 7e3a794be375 - main - nanobsd: default to -j $hw.ncpu
Warner Losh
imp at FreeBSD.org
Thu Jul 15 22:15:45 UTC 2021
The branch main has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=7e3a794be3752d21fe760cfb2a38665532c4b6b4
commit 7e3a794be3752d21fe760cfb2a38665532c4b6b4
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-15 22:15:01 +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
---
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-main
mailing list