diff mbox series

[7/8] debug_build.inc: override MESON_BUILDTYPE for meson.bbclass

Message ID 20250915061743.313230-7-hongxu.jia@windriver.com
State New
Headers show
Series [1/8] yocto-space-optimize.inc: move space optimize from recipe webkitgtk | expand

Commit Message

Hongxu Jia Sept. 15, 2025, 6:17 a.m. UTC
The debug_build.inc is used to collect debug build configuration,
override MESON_BUILDTYPE for meson.bbclass when DEBUG_BUILD is enabled

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 meta/classes-recipe/meson.bbclass        | 3 +--
 meta/conf/distro/include/debug_build.inc | 3 +++
 2 files changed, 4 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/meta/classes-recipe/meson.bbclass b/meta/classes-recipe/meson.bbclass
index c8b3e1ec29a..0944ea03cc2 100644
--- a/meta/classes-recipe/meson.bbclass
+++ b/meta/classes-recipe/meson.bbclass
@@ -28,8 +28,7 @@  MESON_INSTALL_TAGS ?= ""
 def noprefix(var, d):
     return d.getVar(var).replace(d.getVar('prefix') + '/', '', 1)
 
-MESON_BUILDTYPE ?= "${@oe.utils.vartrue('DEBUG_BUILD', 'debug', 'plain', d)}"
-MESON_BUILDTYPE[vardeps] += "DEBUG_BUILD"
+MESON_BUILDTYPE ??= "plain"
 MESONOPTS = " --prefix ${prefix} \
               --buildtype ${MESON_BUILDTYPE} \
               --bindir ${@noprefix('bindir', d)} \
diff --git a/meta/conf/distro/include/debug_build.inc b/meta/conf/distro/include/debug_build.inc
index 979dd111fc9..e446a71dd3f 100644
--- a/meta/conf/distro/include/debug_build.inc
+++ b/meta/conf/distro/include/debug_build.inc
@@ -48,5 +48,8 @@  CXXFLAGS:append:pn-vulkan-validation-layers = " -DXXH_NO_INLINE_HINTS=1"
 INHIBIT_SYSROOT_STRIP:class-cross ?= "1"
 INHIBIT_SYSROOT_STRIP:class-native ?= "1"
 
+# For meson.bbclass
+MESON_BUILDTYPE ?= "debug"
+
 # Allow other layers to add their own debug build configurations
 include_all conf/include/debug_build.inc