Tomáš Chvátal 2018-04-06 12:28:16 +00:00 committed by Git OBS Bridge
parent c5f3d2da75
commit 7de55a45c4

View File

@ -17,7 +17,7 @@
if test "$_threads" -gt 1 ; then \
mem_per_process="$_core_memory" \
max_mem=$(awk '/MemTotal/ { print $2 }' /proc/meminfo) \
max_jobs="$(($max_mem / $mem_per_process))"
max_jobs="$(($max_mem / $mem_per_process))" \
test "$_threads" -gt "$max_jobs" && $_threads="$max_jobs" && echo "Warning: Reducing number of jobs to $max_jobs because of memory limits" \
test "$_threads" -le 0 && $_threads=1 && echo "Warning: Do not use the parallel build at all becuse of memory limits" \
fi \