From 3bdfd9af8879435be310fe913e73cc2f6a6d9758 Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Sat, 9 May 2020 02:10:35 +0200 Subject: [PATCH] extract bcond for lowering build's memory footprint --- thunderbird.spec | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/thunderbird.spec b/thunderbird.spec index 9808502..565dca7 100644 --- a/thunderbird.spec +++ b/thunderbird.spec @@ -15,6 +15,7 @@ %bcond_with system_cairo # build with system cairo (not supported in 60.0) %bcond_with system_libvpx # build with system libvpx (60.7.0 does not build with libvpx 1.8) %bcond_with clang # build using Clang/LLVM +%bcond_with lowmem # lower memory requirements # UPDATING TRANSLATIONS: %if 0 @@ -31,6 +32,10 @@ curl -s $U | sed -ne 's,.*href="\([^"]\+\)/".*,'"$U"'xpi/\1.xpi,p' %undefine crashreporter %endif +%ifarch %{ix86} %{arm} aarch64 +%define with_lowmem 1 +%endif + %define nspr_ver 4.21 %define nss_ver 3.44.3 @@ -1272,16 +1277,21 @@ export CC="%{__cc}" export CXX="%{__cxx}" %endif %ifarch %{ix86} -export CFLAGS="%{rpmcflags} -D_FILE_OFFSET_BITS=64 -g0" -export CXXFLAGS="%{rpmcxxflags} -D_FILE_OFFSET_BITS=64 -g0" +export CFLAGS="%{rpmcflags} -D_FILE_OFFSET_BITS=64" +export CXXFLAGS="%{rpmcxxflags} -D_FILE_OFFSET_BITS=64" +%else +export CFLAGS="%{rpmcflags} -D_FILE_OFFSET_BITS=64" +export CXXFLAGS="%{rpmcxxflags} -D_FILE_OFFSET_BITS=64" +%endif + +%if %{with lowmem} +export CFLAGS="$CFLAGS -g0" +export CXXFLAGS="$CXXFLAGS -g0" export MOZ_DEBUG_FLAGS=" " export LLVM_USE_SPLIT_DWARF=1 export LLVM_PARALLEL_LINK_JOBS=1 export MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" export RUSTFLAGS="-Cdebuginfo=0" -%else -export CFLAGS="%{rpmcflags} -D_FILE_OFFSET_BITS=64" -export CXXFLAGS="%{rpmcxxflags} -D_FILE_OFFSET_BITS=64" %endif %if %{with crashreporter} -- 2.43.0