]> git.pld-linux.org Git - packages/thunderbird.git/commitdiff
extract bcond for lowering build's memory footprint
authorJan Palus <atler@pld-linux.org>
Sat, 9 May 2020 00:10:35 +0000 (02:10 +0200)
committerJan Palus <atler@pld-linux.org>
Sat, 9 May 2020 00:10:35 +0000 (02:10 +0200)
thunderbird.spec

index 98085025cb7d8760a93e601b6734b3bcf4114db1..565dca77a27001cb10caa276f8e039c09e36ef40 100644 (file)
@@ -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}
This page took 0.647832 seconds and 4 git commands to generate.