]> git.pld-linux.org Git - packages/firefox.git/commitdiff
extract bcond for lowering build's memory footprint
authorJan Palus <atler@pld-linux.org>
Tue, 5 May 2020 14:37:01 +0000 (16:37 +0200)
committerJan Palus <atler@pld-linux.org>
Tue, 5 May 2020 14:37:01 +0000 (16:37 +0200)
firefox.spec

index b1ffa6c66f1a7c5c425381af079eda58531123dd..f38a12a6d2b54319a8bb6e955326cae4856bb2bc 100644 (file)
 %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}
This page took 0.040282 seconds and 4 git commands to generate.