Improve build times on non-x86 systems
Signed-off-by: Alexander F. Lent <lx@xanderlent.com>
This commit is contained in:
parent
1aa37ac6dc
commit
2af515c208
1 changed files with 6 additions and 1 deletions
|
|
@ -461,10 +461,15 @@ sed -i -e 's@HIP 1.0@HIP MODULE@' cmake/public/LoadHIP.cmake
|
|||
# Control the number of jobs
|
||||
#
|
||||
# The build can fail if too many threads exceed the physical memory
|
||||
# So count core and and memory and increase the build memory util the build succeeds
|
||||
# Run at least one thread, more if CPU & memory resources are available.
|
||||
#
|
||||
%ifarch x86_64
|
||||
# Real cores, No hyperthreading
|
||||
COMPILE_JOBS=`cat /proc/cpuinfo | grep -m 1 'cpu cores' | awk '{ print $4 }'`
|
||||
%else
|
||||
# cpuinfo format varies on other arches, fall back to nproc
|
||||
COMPILE_JOBS=`nproc`
|
||||
%endif
|
||||
if [ ${COMPILE_JOBS}x = x ]; then
|
||||
COMPILE_JOBS=1
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue