[Mesa-dev] [PATCH] meson: Fix building gallium media targets with gallium-xlib glx
Dylan Baker
dylan at pnwbakers.com
Thu Dec 7 17:16:24 UTC 2017
Quoting Eric Engestrom (2017-12-07 04:17:58)
> On Tuesday, 2017-12-05 09:40:53 -0800, Dylan Baker wrote:
> > Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
> > ---
> > meson.build | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/meson.build b/meson.build
> > index 3e8ea7d17e0..bf6bd551f08 100644
> > --- a/meson.build
> > +++ b/meson.build
> > @@ -1107,9 +1107,9 @@ if with_platform_x11
> > dep_xcb_glx = dependency('xcb-glx', version : '>= 1.8.1')
> > dep_xxf86vm = dependency('xxf86vm', required : false)
> > endif
> > - if with_any_vk or with_glx == 'dri' or
> > - (with_gallium_vdpau or with_gallium_xvmc or with_gallium_omx or
> > - with_gallium_xa)
> > + if (with_any_vk or with_glx == 'dri' or
> > + (with_gallium_vdpau or with_gallium_xvmc or with_gallium_omx or
> > + with_gallium_xa))
>
> Hmm, works for me without this, on both meson 43 and 44; I'm guessing
> meson 42 fails to parse this?
>
> Either way, it doesn't hurt, so:
> Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>
>
> > dep_xcb = dependency('xcb')
> > dep_x11_xcb = dependency('x11-xcb')
> > endif
> > --
> > 2.15.0
> >
You need to run meson like this to exercise the bug (I'll add this to the commit
message):
meson builddir -Dglx=gallium-xlib -Ddri-drivers= -Dvulkan-drivers=
The problem is that meson's parser just stops parsing the if statement as soon
as it decides that the expression so far is true and the next token is 'or' and
there is no way for the whole expression to be false even if the next sub
expression is false. Basically laziness is biting us.
I started working on a linter yesterday but I'm doing it the hard way (aka
writing my own parser).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20171207/04cb5364/attachment-0001.sig>
More information about the mesa-dev
mailing list