From f8631c550878de6d2323e20f268b7c9202acedb6 Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Wed, 12 Oct 2022 19:21:17 +0000 Subject: [PATCH] lmp-staging: serialize do_compile of heavy tasks This is a work around to not compile rust and clang at same time as it is very huge tasks. It uses the bitbake lockfiles to run the refered tasks one at a time. The bitbake UI can be misleading since it will inform you that the tasks are working at the same time, which is not true because only one is working and all the others are blocked. I have a pending bitbake patch to improve this situation. Signed-off-by: Jose Quaresma --- meta-lmp-base/classes/lmp-staging.bbclass | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta-lmp-base/classes/lmp-staging.bbclass b/meta-lmp-base/classes/lmp-staging.bbclass index 2d8c7226cf..7f76c694d9 100644 --- a/meta-lmp-base/classes/lmp-staging.bbclass +++ b/meta-lmp-base/classes/lmp-staging.bbclass @@ -17,6 +17,9 @@ python __anonymous() { if bb.data.inherits_class('go-mod', d): d.appendVarFlag('do_compile', 'network', '1') + + if pn in ["clang", "rust"]: + d.appendVarFlag('do_compile', 'lockfiles', "${TMPDIR}/lmp-hack-avoid-oom-do_compile.lock") } inherit ${INHERIT_KERNEL_MODSIGN}