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:54:34 +0100
commite61c030679b3f4f84ba16c0df143b1d811d3d4b6 (patch)
treecb0f5fcb0a1c63cc12b17636810d612c0e5b0989
parent91a29ab9e9c99fc75cb854827016bc739332e12b (diff)
downloadpoky-e61c030679b3f4f84ba16c0df143b1d811d3d4b6.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. (From OE-Core rev: 7c7c353858a020153be5dba78480b91a28c7a05b) 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}"
12def noprefix(var, d): 12def noprefix(var, d):
13 return d.getVar(var).replace(d.getVar('prefix') + '/', '', 1) 13 return d.getVar(var).replace(d.getVar('prefix') + '/', '', 1)
14 14
15MESON_BUILDTYPE ?= "plain" 15MESON_BUILDTYPE ?= "${@oe.utils.vartrue('DEBUG_BUILD', 'debug', 'plain', d)}"
16MESON_BUILDTYPE[vardeps] += "DEBUG_BUILD"
16MESONOPTS = " --prefix ${prefix} \ 17MESONOPTS = " --prefix ${prefix} \
17 --buildtype ${MESON_BUILDTYPE} \ 18 --buildtype ${MESON_BUILDTYPE} \
18 --bindir ${@noprefix('bindir', d)} \ 19 --bindir ${@noprefix('bindir', d)} \