qt5: qtwebengine: reduce parallel make jobs

The aim is to reduce even more the memory used by the host at build time
to avoid the OOM killer killing the linker.

Otherwise it can fail in machines with few memory even though the linker
is configured with '--no-keep-memory'.

Notice that we also reduce the parallel jobs expanded by 'ninja' build
system configuring and exporting NINJAFLAGS variable. Otherwise this
build system does not honor PARALLEL_MAKE variable.

Fix:
  arm-dey-linux-gnueabi-g++: internal compiler error: Killed (program cc1plus)
  ninja: build stopped: subcommand failed.

https://jira.digi.com/browse/DEL-1973

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
Javier Viguera 2015-12-10 10:30:31 +01:00
parent 79cca553e5
commit 0e1bf79e56
1 changed files with 7 additions and 0 deletions

View File

@ -3,3 +3,10 @@
# Decrease memory used by the linker to avoid being killed due to
# out of memory.
LDFLAGS += "-Wl,--no-keep-memory"
# To avoid the OOM killer, decrease parallel make jobs for this specific recipe.
python __anonymous () {
makejobs = int(d.getVar('PARALLEL_MAKE', True).split()[1]) / 2
d.setVar("PARALLEL_MAKE", "-j %d" % (makejobs, 1)[makejobs == 0])
}
export NINJAFLAGS = "${PARALLEL_MAKE}"