Tune dwz on aarch64

Reduce the dwz limits on aarch64 in order to reduce memory footprint and
avoid OOMs.
This commit is contained in:
Tulio Magno Quites Machado Filho 2023-03-15 16:53:33 -03:00
parent 94faead4aa
commit 53b54148fb
1 changed files with 6 additions and 3 deletions

View File

@ -79,9 +79,12 @@ mv %{cmake_srcdir} cmake
%global _lto_cflags %{nil}
%endif
%ifarch %aarch64
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
%endif
# On aarch64, dwz can take very long to process all the files. It either fails
# reaching a timeout or consumes too much RAM. Restrict its resources in
# order to stop dwz early. We prefer to miss the DWARF optimization than not
# not being able to build this package on aarch64.
%global _dwz_low_mem_die_limit_aarch64 1
%global _dwz_max_die_limit_aarch64 1000000
%cmake -GNinja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \