mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-13 14:59:34 +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:
@@ -215,11 +215,12 @@ mktarball()
|
||||
mkdir -p "${2%/*}" || $err "mk, !mkdir -p \"${2%/*}\""
|
||||
if [ "${tar_implementation% *}" = "tar (GNU tar)" ]; then
|
||||
tar --sort=name --owner=root:0 --group=root:0 \
|
||||
--mtime="UTC 2024-02-25" -c "$1" | xz -T0 -9e > "$2" || \
|
||||
$err "mktarball 1, ${1}"
|
||||
--mtime="UTC 2024-02-25" -c "$1" | xz -T$threads -9e \
|
||||
> "$2" || $err "mktarball 1, ${1}"
|
||||
else
|
||||
# TODO: reproducible tarballs on non-GNU systems
|
||||
tar -c "$1" | xz -T0 -9e > "$2" || $err "mktarball 2, $1"
|
||||
tar -c "$1" | xz -T$threads -9e > "$2" || \
|
||||
$err "mktarball 2, $1"
|
||||
fi
|
||||
(
|
||||
[ "${2%/*}" != "${2}" ] && x_ cd "${2%/*}"
|
||||
|
||||
Reference in New Issue
Block a user