diff options
author | Jordan Williams <jordan@jwillikers.com> | 2024-03-11 09:06:55 -0500 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2024-03-28 13:13:47 +0000 |
commit | 2621484037869c917621b9f961310f13c09fcc00 (patch) | |
tree | 70d7449b53e54067bd1de7b620bfa7e18f744ca7 | |
parent | 8a7ecd774c4032f30949665b42910c2d2cae53f2 (diff) |
egl: Disable symbols check for static builds
The symbols check only works for dynamic libraries.
When building statically, the test fails.
This is caused by the check filtering out non-dynamic symbols with nm.
This change skips the check when building only static libraries.
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
-rw-r--r-- | egl/meson.build | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/egl/meson.build b/egl/meson.build index 5c62ac1..5363e80 100644 --- a/egl/meson.build +++ b/egl/meson.build @@ -13,16 +13,21 @@ if get_option('tests') wayland_egl_abi_check = executable('wayland-egl-abi-check', 'wayland-egl-abi-check.c') test('wayland-egl abi check', wayland_egl_abi_check) - nm_path = find_program(['llvm-nm', 'nm']).full_path() - - test( - 'wayland-egl symbols check', - find_program('wayland-egl-symbols-check'), - env: [ - 'WAYLAND_EGL_LIB=@0@'.format(wayland_egl.full_path()), - 'NM=@0@'.format(nm_path) - ] - ) + if get_option('default_library') != 'static' + nm_path = find_program(['llvm-nm', 'nm']).full_path() + wayland_egl_shared = wayland_egl + if get_option('default_library') == 'both' + wayland_egl_shared = wayland_egl.get_shared_lib() + endif + test( + 'wayland-egl symbols check', + find_program('wayland-egl-symbols-check'), + env: [ + 'WAYLAND_EGL_LIB=@0@'.format(wayland_egl_shared.full_path()), + 'NM=@0@'.format(nm_path) + ] + ) + endif endif install_headers([ |