Reduce memory and ncpu usage

The builds jobs keep restarting. We are most likely hitting OOM.

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
This commit is contained in:
David Abdurachmanov 2023-12-11 09:56:47 +02:00
parent bc8956cea8
commit def598a510
Signed by: davidlt
GPG Key ID: 8B7F1DA0E2C9FDBB

View File

@ -588,11 +588,11 @@ export CXXFLAGS="%{optflags} -D_UNICODE -DHAVE_UINTPTR_T"
export CPPFLAGS=-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H
%if %{with java}
export JAVA_HOME=/usr/lib/jvm/java
%ifarch %{arm} s390x
%ifarch %{arm} s390x riscv64
# getting "java.lang.OutOfMemoryError: Java heap space" during the build
export JAVA_TOOL_OPTIONS=-Xmx2048m
%endif
%ifarch %{arm}
%ifarch %{arm} riscv64
# Likely running out of memory during build
%global _smp_ncpus_max 2
%endif