Unverified Commit 78c6b88a authored byBrowse files
packaging: Limit the number of parallel jobs when building Qt.
Workaround <https://bugreports.qt.io/browse/QTBUG-94800>. This is to avoid out of memory conditions during the build, which requires up to about 2 GiB of memory per parallel process. There was also a problem with how the MAKEFLAGS was passed, which led qtwebengine to be built using all the CPU cores even when specifying a lesser NO_CPUS value. * packaging/rules/debian-qt/rules (min, max): New functions. (NO_CPUS): Express in terms of max. (AVAILABLE_MEMORY, MEMORY_REQUIRED_PER_CORE, COMPUTED_JOB_COUNT) (JOB_COUNT, MAX_PARALLEL_BUILDS): New variables. (override_dh_auto_build): Override to manually control job count. Specify NINJAFLAGS for the Chromium build. * packaging/rules/rpm/jami-libqt.spec (min, max, cpu_count) (available_memory, computed_job_count, job_count): New macros. (%build): Re-indent and use the above 'job_count' variable as the number of parallel jobs. (%install): Likewise. Change-Id: I9134c1e63e92104a1da8435670e2919ce692040c