From 83122cad10816dbf6cb4e4e5fbe93fda9682030f Mon Sep 17 00:00:00 2001 From: Stefan Mavrodiev Date: Wed, 23 Aug 2017 19:27:43 +0300 Subject: [PATCH] Fix USEALLCORES configuration (#733) --- lib/main.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/main.sh b/lib/main.sh index f84bdbee07..6f4c7c4f16 100644 --- a/lib/main.sh +++ b/lib/main.sh @@ -91,14 +91,6 @@ else CCACHE="" fi -# optimize build time with 100% CPU usage -CPUS=$(grep -c 'processor' /proc/cpuinfo) -if [[ $USEALLCORES != no ]]; then - CTHREADS="-j$(($CPUS + $CPUS/2))" -else - CTHREADS="-j1" -fi - # Check and install dependencies, directory structure and settings prepare_host @@ -240,6 +232,14 @@ fi source $SRC/lib/configuration.sh +# optimize build time with 100% CPU usage +CPUS=$(grep -c 'processor' /proc/cpuinfo) +if [[ $USEALLCORES != no ]]; then + CTHREADS="-j$(($CPUS + $CPUS/2))" +else + CTHREADS="-j1" +fi + start=`date +%s` [[ $CLEAN_LEVEL == *sources* ]] && cleaning "sources"