[Mesa-dev] [PATCH v2] wayland-drm: static inline wayland_drm_buffer_get

Dylan Baker dylan at pnwbakers.com
Mon Oct 30 16:42:42 UTC 2017


Quoting Eric Engestrom (2017-10-30 07:12:32)
> On Monday, 2017-10-30 13:39:00 +0000, Emil Velikov wrote:
> > On 30 October 2017 at 12:02, Eric Engestrom <eric.engestrom at imgtec.com> wrote:
> > > On Tuesday, 2017-10-24 17:14:20 +0100, Emil Velikov wrote:
> > >> From: Emil Velikov <emil.velikov at collabora.com>
> > >>
> > >> The function is effectively a direct function call into
> > >> libwayland-server.so.
> > >>
> > >> Thus GBM no longer depends on the wayland-drm static library, making the
> > >> build more straight forward. And the resulting binary is a bit smaller.
> > >>
> > >> Note: we need to move struct wayland_drm_callbacks further up,
> > >> otherwise we'll get an error since the type is incomplete.
> > >>
> > >> v2: Rebase, beef-up commit message, update meson, move struct
> > >> wayland_drm_callbacks.
> > >>
> > >> Cc: Dylan Baker <dylan at pnwbakers.com>
> > >> Cc: Daniel Stone <daniels at collabora.com>
> > >> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
> > >> Reviewed-by: Daniel Stone <daniels at collabora.com> (v1)
> > >> ---
> > >> Dylan can you check the meson bits? Can one say to meson, build object X
> > >> while only using the depA CFLAGS? It seems to me that it currently links
> > >> against depA even when you don't want it to.
> > >
> > > I'm not sure I understand what you're asking: you want to include
> > > wayland-drm.h's path in libgbm's CFLAGS but not link libgbm against
> > > libwayland_drm?
> > >
> > > That looks like what's already happening here:
> > > libgbm has `include_directories('../egl/wayland/wayland-drm')`, and you
> > > removed libwayland_drm from `link_with:`
> > 
> > It's more of a generic question, which I _really_ should not have
> > mentioned here :-\
> 
> I guess IRC's better for this :)
> You should ask your question again there, there are many people who know
> more about meson than me.
> 
> > 
> > When dealing with dependencies (aka executable/shared_library(...
> > dependencies: ...) does meson distinguish between CFLAGS and LIBS?
> > Say you need the CFLAGS but you don't want the linking, or vise-versa.
> 
> The normal case is, you want both, which is what meson does with
> dependency()
> 
> > 
> > Reading through the docs [1], does not say anything on the topic.
> > It seems to me that it will link regardless, which is quite bad.
> 
> I'm no meson expert, but I don't think you can do this split thing
> another way than you did here. And that was only for -I cflags, you'd
> probably have to manually play with get_pkgconfig_variable() if you want
> other things from the .pc

That's exactly what you'd have to do. Give me a sec and I'll build/review.

> 
> > 
> > [1] http://mesonbuild.com/Dependencies.html
> > 
> > >
> > > I haven't tested your patch, but it looks correct to me.
> > >
> > Thanks, can you make it a formal r-b/ack/t-b ;-)
> 
> Sure:
> Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com> # meson bit only
> Acked-by: Eric Engestrom <eric.engestrom at imgtec.com> # for the rest
> 
> > 
> > -Emil
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- 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/20171030/f4879004/attachment.sig>


More information about the mesa-dev mailing list