summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/mesa/mesa.inc
diff options
context:
space:
mode:
authorTrevor Woerner <twoerner@gmail.com>2019-12-11 12:23:34 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-12-16 23:25:49 +0000
commit15a450cd94b76787d7a15d54eca6d522a29eae49 (patch)
tree554c780cbf10ea54165062a91869655f5fb67dde /meta/recipes-graphics/mesa/mesa.inc
parentdd18244afa5cdd56e30a67489ebcb04875d541b6 (diff)
downloadpoky-15a450cd94b76787d7a15d54eca6d522a29eae49.tar.gz
mesa.inc: allow the user to choose the build type
Upstream mesa can either be built as a debug release (the default) or a production release. This patch allows the user to choose which one they want by setting MESA_BUILD_TYPE to either 'production' or 'debug' as they see fit. Under OpenEmbedded a production build will be performed by default. (From OE-Core rev: 6a6b775d69aa59102e1f6a68c88276be6d54a8e6) Signed-off-by: Trevor Woerner <twoerner@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/mesa/mesa.inc')
-rw-r--r--meta/recipes-graphics/mesa/mesa.inc13
1 files changed, 13 insertions, 0 deletions
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index 5838207e6b..9ad9f2e370 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -46,6 +46,19 @@ export WANT_LLVM_RELEASE = "${MESA_LLVM_RELEASE}"
46 46
47MESA_LLVM_RELEASE ?= "${LLVMVERSION}" 47MESA_LLVM_RELEASE ?= "${LLVMVERSION}"
48 48
49# set the MESA_BUILD_TYPE to either 'release' (default) or 'debug'
50# by default the upstream mesa sources build a debug release
51# here we assume the user will want a release build by default
52MESA_BUILD_TYPE ?= "release"
53def check_buildtype(d):
54 _buildtype = d.getVar('MESA_BUILD_TYPE')
55 if _buildtype not in ['release', 'debug']:
56 bb.fatal("unknown build type (%s), please set MESA_BUILD_TYPE to either 'release' or 'debug'" % _buildtype)
57 if _buildtype == 'debug':
58 return 'debugoptimized'
59 return 'plain'
60MESON_BUILDTYPE = "${@check_buildtype(d)}"
61
49EXTRA_OEMESON = " \ 62EXTRA_OEMESON = " \
50 -Dshared-glapi=true \ 63 -Dshared-glapi=true \
51 -Dgallium-opencl=disabled \ 64 -Dgallium-opencl=disabled \