[packages/firefox] define parallel jobs number also for clang (all cores by default)

atler atler at pld-linux.org
Tue May 5 16:39:32 CEST 2020


commit 4a75b9ca07377f452a674345e248f2e4ec8ef0c9
Author: Jan Palus <atler at pld-linux.org>
Date:   Tue May 5 10:18:35 2020 +0200

    define parallel jobs number also for clang (all cores by default)

 firefox.spec | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/firefox.spec b/firefox.spec
index cd12299..b1ffa6c 100644
--- a/firefox.spec
+++ b/firefox.spec
@@ -2127,12 +2127,14 @@ EOF
 %if ! %{with clang}
 # 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=1
+MOZ_PARALLEL_BUILD=1
 %ifarch %{x8664}
-jobs=$(echo %{_smp_mflags} | cut -dj -f2)
-[ -n "$jobs" -a "$jobs" -gt 4 ] && RPM_BUILD_NR_THREADS=4 || RPM_BUILD_NR_THREADS="$jobs"
+jobs="%{__jobs}"
+[ -n "$jobs" -a "$jobs" -gt 4 ] && MOZ_PARALLEL_BUILD=4 || MOZ_PARALLEL_BUILD="$jobs"
 %endif
-export MOZ_MAKE_FLAGS="-j${RPM_BUILD_NR_THREADS}"
+export MOZ_PARALLEL_BUILD
+%else
+%{?__jobs:export MOZ_PARALLEL_BUILD="%__jobs"}
 %endif
 
 export MOZ_SERVICES_SYNC="1"
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/firefox.git/commitdiff/6cb60c5b7c1f2a590013e3d304be3e349ed5a140



More information about the pld-cvs-commit mailing list