meson.bbclass: Make the default buildtype "debug" if DEBUG_BUILD is 1
PATCH 1/1 meson.bbclass: Make the default buildtype "debug" if DEBUG_BUILD is 1
Setting the Meson buildtype to "debug" will by default only enable the -g option to the compiler, which should not matter for OE-Core as it is already enabled by setting DEBUG_BUILD to 1 in the first place. However, if the package uses get_option('debug') in its meson.build files to enable package specific debug code, this will now trigger as intended.
Signed-off-by Peter Kjellerstedt <[email protected]>
--- meta/classes/meson.bbclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meta/classes/meson.bbclass +2 -1
@@ -12,7 +12,8 @@ MESON_SOURCEPATH = "${S}" def noprefix(var, d): return d.getVar(var).replace(d.getVar('prefix') + '/', '', 1) -MESON_BUILDTYPE ?= "plain" +MESON_BUILDTYPE ?= "${@oe.utils.vartrue('DEBUG_BUILD', 'debug', 'plain', d)}" +MESON_BUILDTYPE[vardeps] += "DEBUG_BUILD" MESONOPTS = " --prefix ${prefix} \ --buildtype ${MESON_BUILDTYPE} \ --bindir ${@noprefix('bindir', d)} \