Go to file
Gaël PORTAY a475e0d874 qt5webengine: propagate parallel flag to ninja
WebEngine is a big project to build. It uses ninja which is a build
system that does everything in parallel[1].

	Builds are always run in parallel, based by default on the number of
	CPUs your system has. Underspecified build dependencies will result in
	incorrect builds.

QtWebEngine does not propagate the parallel flag from the running
instance of make to ninja. Thus, all the machine cores are used to build
this single project.

	make -j 10 -> ninja -j # all cores

This behavior disrupts powerful machines which are setup to build many
projects in parallel. Even worse, the build fails on machines where the
ratio CPU-cores / amount of RAM (including swap) is not appropriate. g++
may have not enough of memory to build all those files in parallel.

Unfortunatly, the target `run_ninja' is hardcoded in the Makefile
src/core/Makefile.run_gn; there is no way to propagate flags using a
variable through the make command-line.

	run_ninja:
	        /home/gportay/src/buildroot/output-qt5.11/build/qt5webengine-5.11.1/src/3rdparty/ninja/ninja
-C /home/gportay/src/buildroot/output-qt5.11/build/qt5webengine-5.11.1/src/core/release QtWebEngineCore

Luckily, the Qt gn_run.pro[2] can hardcode ninja extra flags through the
variable NINJAFLAGS when the Makefile is generated (which is performed
during the build and not during configure step).

This commit sets the NINJAFLAGS using the variable PARALLEL_JOBS to limit
the number of cores used by ninja.

Fixes:
	virtual memory exhausted: Cannot allocate memory

[1]: https://ninja-build.org/manual.html#_comparison_to_make
[2]: https://github.com/qt/qtwebengine/blob/v5.11.1/src/core/gn_run.pro#L49-L53

CC: Damien Riegel <damien.riegel@savoirfairelinux.com>
CC: Jean-François Têtu <jean-francois.tetu@savoirfairelinux.com>
Signed-off-by: Gaël PORTAY <gael.portay@savoirfairelinux.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-07-01 11:04:59 +02:00
arch arch: add BR2_ARCH_NEEDS_GCC_AT_LEAST_8 2018-05-30 21:44:01 +02:00
board board/raspberrypi: update firmware option to use 64-bit mode 2018-06-30 22:07:01 +02:00
boot uboot: don't override HOSTCC/HOSTLDFLAGS for kconfig 2018-06-24 21:11:11 +02:00
configs configs/imx6-sabresd: bump U-Boot and Linux kernel 2018-06-28 21:09:28 +02:00
docs docs/website/download.html: fix latest LTS version number 2018-06-19 13:45:20 +02:00
fs fs: ensure hard links in TARGET_DIR are correctly copied for filesystem input 2018-05-27 23:46:29 +02:00
linux linux: bump default to version 4.17.3 2018-06-26 21:17:42 +02:00
package qt5webengine: propagate parallel flag to ninja 2018-07-01 11:04:59 +02:00
support support/config-fragments/autobuild: update pre-built Buildroot toolchains 2018-06-30 18:00:30 +02:00
system skeleton: PAGER without blank and unset at end of for loop 2018-06-05 18:50:49 +02:00
toolchain toolchain-external-linaro-aarch64-be: new package 2018-06-28 22:15:55 +02:00
utils support/config-fragments/autobuild: add Linaro AArch64 BE support 2018-06-28 22:15:57 +02:00
.defconfig arch: remove support for sh64 2016-09-08 22:15:15 +02:00
.flake8 .flake8: ignore utils/diffconfig 2018-03-13 22:37:54 +01:00
.gitignore
.gitlab-ci.yml .gitlab-ci.yml: update after removal of freescale defconfigs 2018-05-06 17:36:37 +02:00
.gitlab-ci.yml.in .gitlab-ci.yml: extend check-package test to Config.* files 2018-04-01 10:16:35 +02:00
CHANGES Update for 2018.02.3 2018-06-18 20:03:59 +02:00
Config.in Config.in: add BR2_HOST_GCC_AT_LEAST_8 2018-05-02 14:50:14 +02:00
Config.in.legacy gst1-plugins-${base, good, bad, ugly}: bump to 1.14.1 2018-06-26 22:08:36 +02:00
COPYING
DEVELOPERS DEVELOPERS: add myself to package qt5webkit 2018-07-01 11:01:49 +02:00
Makefile Kickoff 2018.08 cycle 2018-06-02 11:11:56 +02:00
Makefile.legacy Remove BR2_DEPRECATED 2016-10-15 23:14:45 +02:00
README

Buildroot is a simple, efficient and easy-to-use tool to generate embedded
Linux systems through cross-compilation.

The documentation can be found in docs/manual. You can generate a text
document with 'make manual-text' and read output/docs/manual/manual.text.
Online documentation can be found at http://buildroot.org/docs.html

To build and use the buildroot stuff, do the following:

1) run 'make menuconfig'
2) select the target architecture and the packages you wish to compile
3) run 'make'
4) wait while it compiles
5) find the kernel, bootloader, root filesystem, etc. in output/images

You do not need to be root to build or run buildroot.  Have fun!

Buildroot comes with a basic configuration for a number of boards. Run
'make list-defconfigs' to view the list of provided configurations.

Please feed suggestions, bug reports, insults, and bribes back to the
buildroot mailing list: buildroot@buildroot.org
You can also find us on #buildroot on Freenode IRC.

If you would like to contribute patches, please read
https://buildroot.org/manual.html#submitting-patches