summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-04-03 01:14:46 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-04-03 09:04:20 +0200
commit74ab8d14904041023bd0b66e05b6560110fc71be (patch)
tree68647a96b3f89cc61c223ff7d0c588c0e528d62b
parent47ba7f02a88f060aaffce04ac495baa04fa0115c (diff)
downloadrockbox-74ab8d1490.tar.gz
rockbox-74ab8d1490.tar.bz2
rockbox-74ab8d1490.zip
toolchain: Parallelize the toolchain build if possible
Let's actually use those newfangled multicore processors! Change-Id: Idfc21f10d634b969c49e7f22ab723e48951db0f0
-rwxr-xr-xtools/rockboxdev.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/rockboxdev.sh b/tools/rockboxdev.sh
index 4af9acfb37..822a76da9f 100755
--- a/tools/rockboxdev.sh
+++ b/tools/rockboxdev.sh
@@ -29,6 +29,11 @@ else
make="make"
fi
+parallel=`nproc`
+if [ $parallel -gt 1 ] ; then
+ make_parallel=-j$parallel
+fi
+
if [ -z $GNU_MIRROR ] ; then
GNU_MIRROR=http://mirrors.kernel.org/gnu
fi
@@ -322,7 +327,7 @@ buildtool() {
if [ "$make_opts" != "NO_MAKE" ]; then
echo "ROCKBOXDEV: $toolname/make"
- run_cmd "$logfile" $make $make_opts
+ run_cmd "$logfile" $make $make_parallel $make_opts
fi
if [ "$install_opts" = "" ]; then
@@ -428,7 +433,7 @@ build() {
esac
echo "ROCKBOXDEV: $toolname/make"
- $make
+ $make $make_parallel
echo "ROCKBOXDEV: $toolname/make install"
$make install