]> code.ossystems Code Review - openembedded-core.git/commitdiff
meson.bbclass: allow buildtype to be changed
authorTrevor Woerner <twoerner@gmail.com>
Wed, 11 Dec 2019 17:08:18 +0000 (12:08 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 16 Dec 2019 23:22:03 +0000 (23:22 +0000)
Some upstream projects are employing the buildtype parameter so users
can create, say, "production" versus "debug" builds. Therefore create a
configurable parameter so recipes/users can tweak it.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/meson.bbclass

index dc8c28963c77fa445d77f6e76db1601f67418d7b..e1a13bbbf746327634dee2c0333f295768202dc2 100644 (file)
@@ -12,8 +12,9 @@ MESON_SOURCEPATH = "${S}"
 def noprefix(var, d):
     return d.getVar(var).replace(d.getVar('prefix') + '/', '', 1)
 
+MESON_BUILDTYPE ?= "plain"
 MESONOPTS = " --prefix ${prefix} \
-              --buildtype plain \
+              --buildtype ${MESON_BUILDTYPE} \
               --bindir ${@noprefix('bindir', d)} \
               --sbindir ${@noprefix('sbindir', d)} \
               --datadir ${@noprefix('datadir', d)} \