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

Emil Velikov emil.l.velikov at gmail.com
Mon Oct 30 13:39:00 UTC 2017


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 :-\

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.

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.

[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 ;-)

-Emil


More information about the mesa-dev mailing list