summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2021-08-26 14:59:12 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-08-27 11:53:23 +0100
commit7c7c353858a020153be5dba78480b91a28c7a05b (patch)
tree13d35d63117c1e0bc015ce2e130ff86b769f67f8
parentde0aa1700ed4e6f04b0a233eb1f6d2ac598e7ed8 (diff)
downloadopenembedded-core-7c7c353858a020153be5dba78480b91a28c7a05b.tar.gz
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 <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/meson.bbclass3
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/classes/meson.bbclass b/meta/classes/meson.bbclass
index 2beed89d11..e124d18144 100644
--- a/meta/classes/meson.bbclass
+++ b/meta/classes/meson.bbclass
@@ -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)} \