diff --git a/local/scripts/build-redbear.sh b/local/scripts/build-redbear.sh index 88c20c6b73..c03e1b44a9 100755 --- a/local/scripts/build-redbear.sh +++ b/local/scripts/build-redbear.sh @@ -9,7 +9,7 @@ PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)" # REDBEAR_VERSION (which tracks the OS release derived from the git branch). # Starts at 1.0 and is bumped AUTOMATICALLY on every change by the pre-commit # git hook (local/scripts/bump-build-version.sh); do not edit the minor by hand. -BUILD_REDBEAR_VERSION="1.9" +BUILD_REDBEAR_VERSION="1.10" # ── Colorized output ────────────────────────────────── # Enabled only on a TTY with NO_COLOR unset, so redirected build logs and CI @@ -303,9 +303,16 @@ CONFIG="redbear-full" JOBS="${JOBS:-$(nproc)}" # Dep-level parallel recipe cooking: cook this many independent (same-level) # recipes at once. The make-job budget (JOBS) is divided across the concurrent -# cooks per level, so lone heavyweight recipes still get the full -j. Default to -# a quarter of JOBS (min 1); override with COOKBOOK_COOK_JOBS=1 to force serial. -COOK_JOBS_DEFAULT=$(( JOBS / 4 )); [ "$COOK_JOBS_DEFAULT" -lt 1 ] && COOK_JOBS_DEFAULT=1 +# cooks per level, so total compile parallelism stays ~JOBS (RAM stays bounded to +# roughly a serial -j${JOBS} build) while the extra recipe-concurrency fills the +# cores left idle during configure/link/small-file phases. +# +# Default to JOBS/2: this keeps per-recipe make jobs >= 2 (so a busy level still +# uses the whole -j${JOBS} budget), while giving enough recipe-concurrency to +# saturate the machine. Going higher (e.g. JOBS/1) would floor per-recipe jobs to +# 1 and leave part of the budget unused on large levels. Override with +# COOKBOOK_COOK_JOBS=1 to force serial, or any value to tune. +COOK_JOBS_DEFAULT=$(( JOBS / 2 )); [ "$COOK_JOBS_DEFAULT" -lt 1 ] && COOK_JOBS_DEFAULT=1 export COOKBOOK_COOK_JOBS="${COOKBOOK_COOK_JOBS:-$COOK_JOBS_DEFAULT}" APPLY_PATCHES="${APPLY_PATCHES:-1}" NO_CACHE=0