* [PATCH] mesa.inc: allow the user to choose the build type
@ 2019-12-11 17:23 Trevor Woerner
2019-12-11 18:40 ` Khem Raj
0 siblings, 1 reply; 4+ messages in thread
From: Trevor Woerner @ 2019-12-11 17:23 UTC (permalink / raw)
To: openembedded-core
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.
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
meta/recipes-graphics/mesa/mesa.inc | 13 +++++++++++++
1 file changed, 13 insertions(+)
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}"
MESA_LLVM_RELEASE ?= "${LLVMVERSION}"
+# set the MESA_BUILD_TYPE to either 'release' (default) or 'debug'
+# by default the upstream mesa sources build a debug release
+# here we assume the user will want a release build by default
+MESA_BUILD_TYPE ?= "release"
+def check_buildtype(d):
+ _buildtype = d.getVar('MESA_BUILD_TYPE')
+ if _buildtype not in ['release', 'debug']:
+ bb.fatal("unknown build type (%s), please set MESA_BUILD_TYPE to either 'release' or 'debug'" % _buildtype)
+ if _buildtype == 'debug':
+ return 'debugoptimized'
+ return 'plain'
+MESON_BUILDTYPE = "${@check_buildtype(d)}"
+
EXTRA_OEMESON = " \
-Dshared-glapi=true \
-Dgallium-opencl=disabled \
--
2.23.0.37.g745f681289
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] mesa.inc: allow the user to choose the build type
2019-12-11 17:23 [PATCH] mesa.inc: allow the user to choose the build type Trevor Woerner
@ 2019-12-11 18:40 ` Khem Raj
2019-12-11 22:13 ` Ross Burton
0 siblings, 1 reply; 4+ messages in thread
From: Khem Raj @ 2019-12-11 18:40 UTC (permalink / raw)
To: Trevor Woerner; +Cc: Patches and discussions about the oe-core layer
On Wed, Dec 11, 2019 at 9:23 AM Trevor Woerner <twoerner@gmail.com> wrote:
>
> 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.
>
> Signed-off-by: Trevor Woerner <twoerner@gmail.com>
> ---
> meta/recipes-graphics/mesa/mesa.inc | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> 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}"
>
> MESA_LLVM_RELEASE ?= "${LLVMVERSION}"
>
> +# set the MESA_BUILD_TYPE to either 'release' (default) or 'debug'
> +# by default the upstream mesa sources build a debug release
> +# here we assume the user will want a release build by default
> +MESA_BUILD_TYPE ?= "release"
> +def check_buildtype(d):
> + _buildtype = d.getVar('MESA_BUILD_TYPE')
> + if _buildtype not in ['release', 'debug']:
> + bb.fatal("unknown build type (%s), please set MESA_BUILD_TYPE to either 'release' or 'debug'" % _buildtype)
> + if _buildtype == 'debug':
> + return 'debugoptimized'
> + return 'plain'
> +MESON_BUILDTYPE = "${@check_buildtype(d)}"
> +
Should this also be controlled with DEBUG_BUILD knob
> EXTRA_OEMESON = " \
> -Dshared-glapi=true \
> -Dgallium-opencl=disabled \
> --
> 2.23.0.37.g745f681289
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mesa.inc: allow the user to choose the build type
2019-12-11 18:40 ` Khem Raj
@ 2019-12-11 22:13 ` Ross Burton
2019-12-11 22:24 ` Khem Raj
0 siblings, 1 reply; 4+ messages in thread
From: Ross Burton @ 2019-12-11 22:13 UTC (permalink / raw)
To: openembedded-core
On 11/12/2019 18:40, Khem Raj wrote:
> On Wed, Dec 11, 2019 at 9:23 AM Trevor Woerner <twoerner@gmail.com> wrote:
>>
>> 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.
>>
>> Signed-off-by: Trevor Woerner <twoerner@gmail.com>
>> ---
>> meta/recipes-graphics/mesa/mesa.inc | 13 +++++++++++++
>> 1 file changed, 13 insertions(+)
>>
>> 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}"
>>
>> MESA_LLVM_RELEASE ?= "${LLVMVERSION}"
>>
>> +# set the MESA_BUILD_TYPE to either 'release' (default) or 'debug'
>> +# by default the upstream mesa sources build a debug release
>> +# here we assume the user will want a release build by default
>> +MESA_BUILD_TYPE ?= "release"
>> +def check_buildtype(d):
>> + _buildtype = d.getVar('MESA_BUILD_TYPE')
>> + if _buildtype not in ['release', 'debug']:
>> + bb.fatal("unknown build type (%s), please set MESA_BUILD_TYPE to either 'release' or 'debug'" % _buildtype)
>> + if _buildtype == 'debug':
>> + return 'debugoptimized'
>> + return 'plain'
>> +MESON_BUILDTYPE = "${@check_buildtype(d)}"
>> +
>
> Should this also be controlled with DEBUG_BUILD knob
Not convinced. From what Trevor said on IRC, a Mesa debug build is more
than just symbols but full on debug output.
Ross
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mesa.inc: allow the user to choose the build type
2019-12-11 22:13 ` Ross Burton
@ 2019-12-11 22:24 ` Khem Raj
0 siblings, 0 replies; 4+ messages in thread
From: Khem Raj @ 2019-12-11 22:24 UTC (permalink / raw)
To: Ross Burton; +Cc: Patches and discussions about the oe-core layer
On Wed, Dec 11, 2019 at 2:13 PM Ross Burton <ross.burton@intel.com> wrote:
>
> On 11/12/2019 18:40, Khem Raj wrote:
> > On Wed, Dec 11, 2019 at 9:23 AM Trevor Woerner <twoerner@gmail.com> wrote:
> >>
> >> 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.
> >>
> >> Signed-off-by: Trevor Woerner <twoerner@gmail.com>
> >> ---
> >> meta/recipes-graphics/mesa/mesa.inc | 13 +++++++++++++
> >> 1 file changed, 13 insertions(+)
> >>
> >> 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}"
> >>
> >> MESA_LLVM_RELEASE ?= "${LLVMVERSION}"
> >>
> >> +# set the MESA_BUILD_TYPE to either 'release' (default) or 'debug'
> >> +# by default the upstream mesa sources build a debug release
> >> +# here we assume the user will want a release build by default
> >> +MESA_BUILD_TYPE ?= "release"
> >> +def check_buildtype(d):
> >> + _buildtype = d.getVar('MESA_BUILD_TYPE')
> >> + if _buildtype not in ['release', 'debug']:
> >> + bb.fatal("unknown build type (%s), please set MESA_BUILD_TYPE to either 'release' or 'debug'" % _buildtype)
> >> + if _buildtype == 'debug':
> >> + return 'debugoptimized'
> >> + return 'plain'
> >> +MESON_BUILDTYPE = "${@check_buildtype(d)}"
> >> +
> >
> > Should this also be controlled with DEBUG_BUILD knob
>
> Not convinced. From what Trevor said on IRC, a Mesa debug build is more
> than just symbols but full on debug output.
I understand that.
DEBUG_BUILD and DEBUG_OPTIMIZATION are two different things
I am not saying tie it to DEBUG_OPTIMIZATION
>
> Ross
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-12-11 22:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-11 17:23 [PATCH] mesa.inc: allow the user to choose the build type Trevor Woerner
2019-12-11 18:40 ` Khem Raj
2019-12-11 22:13 ` Ross Burton
2019-12-11 22:24 ` Khem Raj
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.