From 3e301b8e708e94be0512d8425c33c418a81e5cf7 Mon Sep 17 00:00:00 2001 From: Kenny Levinsen Date: Mon, 3 Aug 2020 00:54:43 +0200 Subject: libseat: Use symbol file instead of -fvisibility --- meson.build | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'meson.build') diff --git a/meson.build b/meson.build index 59a773f..7d79a31 100644 --- a/meson.build +++ b/meson.build @@ -25,7 +25,6 @@ add_project_arguments( '-Wno-unused-command-line-argument', '-Wvla', '-Wl,--exclude-libs=ALL', - '-fvisibility=hidden', '-D_XOPEN_SOURCE=700', '-D__BSD_VISIBLE', ], @@ -128,12 +127,16 @@ private_lib = static_library( include_directories: [include_directories('.', 'include')], ) +symbols_file = 'libseat/libseat.syms' +symbols_flag = '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), symbols_file) lib = library( 'seat', # This results in the library being called 'libseat' [ 'libseat/libseat.c' ], link_with: private_lib, include_directories: [include_directories('.', 'include')], install: true, + link_args: symbols_flag, + link_depends: symbols_file, ) install_headers('include/libseat.h') -- cgit v1.2.3