[packages/firefox] extract bcond for lowering build's memory footprint
atler
atler at pld-linux.org
Tue May 5 16:39:37 CEST 2020
commit 6cb60c5b7c1f2a590013e3d304be3e349ed5a140
Author: Jan Palus <atler at pld-linux.org>
Date: Tue May 5 16:37:01 2020 +0200
extract bcond for lowering build's memory footprint
firefox.spec | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
---
diff --git a/firefox.spec b/firefox.spec
index b1ffa6c..f38a12a 100644
--- a/firefox.spec
+++ b/firefox.spec
@@ -16,12 +16,17 @@
%bcond_with system_cairo # build with system cairo (not supported in 60.0)
%bcond_without system_libvpx # build with system libvpx
%bcond_without clang # build using Clang/LLVM
+%bcond_with lowmem # lower memory requirements
%if %{with lto}
%define with_clang 1
%undefine with_gold
%endif
+%ifarch %{ix86} %{arm} aarch64
+%define with_lowmem 1
+%endif
+
# On updating version, grab CVE links from:
# https://www.mozilla.org/security/known-vulnerabilities/firefox.html
# Release Notes:
@@ -2047,16 +2052,21 @@ export CC="%{__cc}"
export CXX="%{__cxx}"
%endif
%ifarch %{ix86}
-export CFLAGS="%{rpmcflags} %{!?with_system_libvpx:-mmmx} -D_FILE_OFFSET_BITS=64 -g0"
-export CXXFLAGS="%{rpmcxxflags} -mmmx -D_FILE_OFFSET_BITS=64 -g0"
+export CFLAGS="%{rpmcflags} %{!?with_system_libvpx:-mmmx} -D_FILE_OFFSET_BITS=64"
+export CXXFLAGS="%{rpmcxxflags} -mmmx -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
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-%{_target_cpu}
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/firefox.git/commitdiff/6cb60c5b7c1f2a590013e3d304be3e349ed5a140
More information about the pld-cvs-commit
mailing list