Lower memory usage for riscv64

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
This commit is contained in:
David Abdurachmanov 2023-11-08 14:19:52 +02:00 committed by Richard W.M. Jones
parent 89eacb88ce
commit 6b5e21282d

View File

@ -83,9 +83,20 @@ ExclusiveArch: %{rust_arches}
%bcond_with disabled_libssh2
%endif
%if 0%{?__isa_bits} == 32
# Reduce rustc's own debuginfo and optimizations to conserve 32-bit memory.
# e.g. https://github.com/rust-lang/rust/issues/45854
%global reduced_debuginfo 0
%if 0%{?__isa_bits} == 32
%global reduced_debuginfo 1
%endif
# Also on current riscv64 hardware, although future hardware will be
# able to handle it.
# e.g. http://fedora.riscv.rocks/koji/buildinfo?buildID=249870
%ifarch riscv64
%global reduced_debuginfo 1
%endif
%if 0%{?reduced_debuginfo}
%global enable_debuginfo --debuginfo-level=0 --debuginfo-level-std=2
%global enable_rust_opts --set rust.codegen-units-std=1
%bcond_with rustc_pgo