mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 14:02:52 +02:00
allow users to specify number of build threads
lbmk otherwise uses nproc to set the number of build threads, in these places: * generic make commands in script/update/trees * crossgcc make command in script/update/trees the -T0 option is also used in script/update/release, when running tar. with this change, you can do: export LBMK_THREADS=x where x is the number of threads. when you then run lbmk, your chosen number of threads will override the default. this may be useful on a host that does not have a lot of memory. Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
+2
-2
@@ -172,7 +172,7 @@ check_cross_compiler()
|
||||
[ -n "${xlang}" ] && export BUILD_LANGUAGES="$xlang"
|
||||
|
||||
[ -d "${cbdir}/util/crossgcc/xgcc/${_xarch}/" ] && continue
|
||||
x_ make -C "$cbdir" crossgcc-${_xarch%-*} CPUS=$(nproc)
|
||||
x_ make -C "$cbdir" crossgcc-${_xarch%-*} CPUS=$threads
|
||||
done
|
||||
}
|
||||
|
||||
@@ -219,7 +219,7 @@ run_make_command()
|
||||
[ "$project" = "coreboot" ] && [ -z "$mode" ] && x_ \
|
||||
printf "%s\n" "${version%%-*}" > "$codedir/.coreboot-version"
|
||||
|
||||
make $mode -j$(nproc) $makeargs -C "$codedir" || \
|
||||
make $mode -j$threads $makeargs -C "$codedir" || \
|
||||
$err "run_make $codedir: !make $mode"
|
||||
|
||||
[ "$mode" != "clean" ] && return 0
|
||||
|
||||
Reference in New Issue
Block a user