[packages/firefox] - parallel build for non-clang (from fc)
arekm
arekm at pld-linux.org
Sun Jan 26 01:51:25 CET 2020
commit cd0d4de7fdd36d2493a9d2c10b946e2b6fada9eb
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Sun Jan 26 01:51:15 2020 +0100
- parallel build for non-clang (from fc)
firefox.spec | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
---
diff --git a/firefox.spec b/firefox.spec
index 2932e7f..5a46da9 100644
--- a/firefox.spec
+++ b/firefox.spec
@@ -2127,7 +2127,16 @@ ac_add_options --with-system-zlib
ac_add_options BINDGEN_CFLAGS="$(pkg-config nspr pixman-1 --cflags)"
EOF
-%{!?with_clang:export MOZ_MAKE_FLAGS="-j1"}
+# On x86_64 architectures, Mozilla can build up to 4 jobs at once in parallel,
+# however builds tend to fail on other arches when building in parallel.
+RPM_BUILD_NR_THREADS=$(echo %{_smp_mflags} | cut -dj -f2)
+%ifarch %{x8864}
+[ -n "RPM_BUILD_NR_THREADS" -a "$RPM_BUILD_NR_THREADS" -gt 4 ] && RPM_BUILD_NR_THREADS=4
+%else
+RPM_BUILD_NR_THREADS=1
+%endif
+export MOZ_MAKE_FLAGS="-j${RPM_BUILD_NR_THREADS}"
+
export MOZ_SERVICES_SYNC="1"
%if %{with pgo}
D=$(( RANDOM % (200 - 100 + 1 ) + 5 ))
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/firefox.git/commitdiff/cd0d4de7fdd36d2493a9d2c10b946e2b6fada9eb
More information about the pld-cvs-commit
mailing list