Reduce the number of parallel compiles.

Running this script sometimes completely hangs all of our computers.
This change seems to work better for me.

Test: Use script to compile many Androids.
Change-Id: I95539034b35a4ff6dbc39cd67856b0bd7e20d587
This commit is contained in:
Joel Galenson 2019-03-04 14:04:49 -08:00
parent e146c216cc
commit 3fbd303d1c

View file

@ -54,7 +54,7 @@ done
# This heuristic could probably be improved.
cores=$(nproc --all)
num_targets=$(echo "$targets" | sed 's/ /\n/g' | wc -l)
parallel_jobs=$(expr $cores / 2)
parallel_jobs=$(expr $cores / 4)
if [[ $num_targets -lt $parallel_jobs ]]; then
export mmma_jobs=$(expr $cores / $num_targets \* 2)
else