From 64c974e518de6fef30da7afa89469c49cf2ea4c3 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 11 Jul 2024 00:00:28 +0100 Subject: [PATCH] distro/include: Add yocto-space-optimize, disabling debugging for large components Add an include file to allow turning off the debug compiler options for a small set of recipes to reduce build on disk footprint and package/sstate sizes. This is currently applied to llvm, qemu and openssl target recipes. The llvm-staticdev package takes up around 1.3GB alone. These three changes lead to a reduction in TMPDIR size for a world build from 240GB to 199GB, also removing some very large sstate objects. There is more that could and should be done but this does illustrate one way to speed up and reduce build size in a focused way whilst we ideally look into other approaches. (From OE-Core rev: 5461ec3d0e5b97d9ac52b70598af0383f80f83d2) Signed-off-by: Richard Purdie --- meta/conf/distro/include/yocto-space-optimize.inc | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 meta/conf/distro/include/yocto-space-optimize.inc diff --git a/meta/conf/distro/include/yocto-space-optimize.inc b/meta/conf/distro/include/yocto-space-optimize.inc new file mode 100644 index 00000000000..282e77da8fa --- /dev/null +++ b/meta/conf/distro/include/yocto-space-optimize.inc @@ -0,0 +1,10 @@ +# Some components have debug data and workdirs that are simply too large to be useful +# in general builds. Disable or reduce debugging for these cases to improve disk usage +# and build speed. + +# With -g, llvm workdir is 40GB, llvm-staticdev is 1.3GB, llvm-dbg is 1GB +DEBUG_LEVELFLAG:pn-llvm = "" +# With -g, qemu workdir is 10GB, qemu-dbg is 363MB +DEBUG_LEVELFLAG:pn-qemu = "" +# With -g, openssl workdir is 7.4GB, openssl-dbg is 336MB +DEBUG_LEVELFLAG:pn-openssl = "-g1"