aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/build.sh b/build.sh
index dac1aec..27afc98 100755
--- a/build.sh
+++ b/build.sh
@@ -72,11 +72,16 @@ if [ "${BUILD_MODE}" = "shell" ]; then
fi
echo "=== Starting build (mode: ${BUILD_MODE}) ==="
+# BUILD_JOBS controls parallelism (override with `BUILD_JOBS=N ./build.sh`).
+# Defaults to all available cores; set to 4 by default for the in-progress
+# code-review pass to keep the host responsive.
+BUILD_JOBS="${BUILD_JOBS:-4}"
${DOCKER} run --rm \
-v "${SCRIPT_DIR}:/src:rw" \
-v "${CCACHE_DIR}:/ccache:rw" \
-e CCACHE_DIR=/ccache \
-e BUILD_MODE="${BUILD_MODE}" \
+ -e BUILD_JOBS="${BUILD_JOBS}" \
-w /src \
--device /dev/fuse \
--cap-add SYS_ADMIN \