diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2020-04-03 01:14:46 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2020-04-03 09:04:20 +0200 |
commit | 74ab8d14904041023bd0b66e05b6560110fc71be (patch) | |
tree | 68647a96b3f89cc61c223ff7d0c588c0e528d62b | |
parent | 47ba7f02a88f060aaffce04ac495baa04fa0115c (diff) | |
download | rockbox-74ab8d14904041023bd0b66e05b6560110fc71be.tar.gz rockbox-74ab8d14904041023bd0b66e05b6560110fc71be.zip |
toolchain: Parallelize the toolchain build if possible
Let's actually use those newfangled multicore processors!
Change-Id: Idfc21f10d634b969c49e7f22ab723e48951db0f0
-rwxr-xr-x | tools/rockboxdev.sh | 9 |
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 | |||
29 | make="make" | 29 | make="make" |
30 | fi | 30 | fi |
31 | 31 | ||
32 | parallel=`nproc` | ||
33 | if [ $parallel -gt 1 ] ; then | ||
34 | make_parallel=-j$parallel | ||
35 | fi | ||
36 | |||
32 | if [ -z $GNU_MIRROR ] ; then | 37 | if [ -z $GNU_MIRROR ] ; then |
33 | GNU_MIRROR=http://mirrors.kernel.org/gnu | 38 | GNU_MIRROR=http://mirrors.kernel.org/gnu |
34 | fi | 39 | fi |
@@ -322,7 +327,7 @@ buildtool() { | |||
322 | 327 | ||
323 | if [ "$make_opts" != "NO_MAKE" ]; then | 328 | if [ "$make_opts" != "NO_MAKE" ]; then |
324 | echo "ROCKBOXDEV: $toolname/make" | 329 | echo "ROCKBOXDEV: $toolname/make" |
325 | run_cmd "$logfile" $make $make_opts | 330 | run_cmd "$logfile" $make $make_parallel $make_opts |
326 | fi | 331 | fi |
327 | 332 | ||
328 | if [ "$install_opts" = "" ]; then | 333 | if [ "$install_opts" = "" ]; then |
@@ -428,7 +433,7 @@ build() { | |||
428 | esac | 433 | esac |
429 | 434 | ||
430 | echo "ROCKBOXDEV: $toolname/make" | 435 | echo "ROCKBOXDEV: $toolname/make" |
431 | $make | 436 | $make $make_parallel |
432 | 437 | ||
433 | echo "ROCKBOXDEV: $toolname/make install" | 438 | echo "ROCKBOXDEV: $toolname/make install" |
434 | $make install | 439 | $make install |