build: Split core protocols out as separate library

Currently both libwayland-client and libwayland-server contain the core
protocol symbols. This disappoints ASAN when both libraries are included
in the same binary (such as in our test suite).

Compositors also can include both client and server libraries, so this
provides some pointless minor space savings in real world usage as well.

Let's split the protocol bits off into their own library to avoid this
duplication.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
Derek Foreman 2021-07-30 07:49:52 -05:00
parent 91d98b622f
commit c8052d423a
3 changed files with 20 additions and 4 deletions

View file

@ -22,7 +22,8 @@ test_runner_dep = declare_dependency(
include_directories: [ src_inc ],
dependencies: [
dependency('threads'),
cc.find_library('dl', required: false)
cc.find_library('dl', required: false),
wayland_core_protocols_dep
]
)