On Mon, Sep 15, 2025 at 05:25 PM, Peter Kjellerstedt wrote:
diff --git a/meta/conf/distro/include/debug_build.inc b/meta/conf/distro/include/debug_build.inc
index 43d5ae59d53..f594df4b107 100644
--- a/meta/conf/distro/include/debug_build.inc
+++ b/meta/conf/distro/include/debug_build.inc
@@ -43,3 +43,6 @@ EXTRA_OECONF:append:pn-nativesdk-debugedit = " --disable-inlined-xxhash"
lcl_maybe_fortify:pn-vim = ""

CXXFLAGS:append:pn-vulkan-validation-layers = " -DXXH_NO_INLINE_HINTS=1"
+
+# Allow other layers to add their own debug build configurations
+include_all conf/include/debug_build.inc
I think it is a bad idea to have this file in conf/distro/include/debug_build.inc
and then expect other layers to have it in conf/include/debug_build.inc. That is
bound to result in confusing mistakes. However, since you said that you could not
use the include_all in bitbake.conf as you got an error due to the conditional
include, I took a look at it. From what I can tell, the fact that you get an
error is due to a bug in include_all, where it does not behave like include and
require do when it comes to empty variable expansions.

I have sent a stack of changes to the bitbake list that corrects the behavior for
include_all so it works like include and require do. With that applied, you should
be able to use the include_all directly in bitbake.conf instead.
I will move it to original meta/conf/bitbake.conf,
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -830,7 +830,9 @@ include conf/licenses.conf
 require conf/sanity.conf
 include conf/bblock.conf
 
-require ${@oe.utils.vartrue('DEBUG_BUILD', 'conf/distro/include/debug_build.inc', '', d)}
+# Allow other layers to add their own debug build configurations
+include_all ${@oe.utils.vartrue('DEBUG_BUILD', 'conf/distro/include/debug_build.inc', '', d)}
 
 
But as you said, it depends on bitbake commit [1] merged, so I still keep it as a standalone patch
 
[1] https://lists.openembedded.org/g/bitbake-devel/message/18037?p=%2C%2C%2C20%2C0%2C0%2C0%3A%3ACreated%2C%2C%2C20%2C2%2C0%2C115265193%2Cd%253D3&d=3
 
//Hongxu
--
2.34.1