diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2022-02-22 09:30:41 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2022-02-24 10:55:13 +1000 |
commit | c0f77b600122a3d8bdefa7a20a84f4049681d1e7 (patch) | |
tree | 1efdc8c0c2b666014969b4cd95b9d76b6f50083a | |
parent | b534f8fba8dbf3dc373db27c1b2b6e3103923e28 (diff) | |
download | xf86-input-wacom-c0f77b600122a3d8bdefa7a20a84f4049681d1e7.tar.gz |
meson: use gnu_symbol_visibility - sort-of
meson has gnu_symbol_visibility which is set correctly depending on the
compiler. Except - where the X server was built with a
symbol-visibility-supporting compiler it will always force
-fvisibility=hidden into the cflags, see
https://gitlab.freedesktop.org/xorg/xserver/-/issues/1316
Meson sorts pkgconf cflags after the gnu_symbol_visibility flag so the
pkgconf cflag overrides our gnu_symbol_visibility flag.
Make a note on this so no-one else has to spend time wondering about and
debugging this.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | meson.build | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/meson.build b/meson.build index 7652e0d..c6c7c65 100644 --- a/meson.build +++ b/meson.build @@ -43,8 +43,6 @@ cflags = [ '-Wshift-overflow=2', '-Wstrict-overflow=2', '-Wswitch-enum', - - '-fvisibility=hidden', ] add_project_arguments(cc.get_supported_arguments(cflags), language : 'c') add_project_arguments('-D_GNU_SOURCE', language : 'c') @@ -154,6 +152,9 @@ shared_module( name_prefix: '', # we want wacomdrv.so, not libwacomdrv.so install_dir: dir_xorg_modules, install: true, + # Note: xorg-xserver.pc always appends -fvisibility=hidden so + # this correct but superfluous + gnu_symbol_visibility: 'hidden', ) conf_pkgconf = configuration_data() @@ -215,6 +216,8 @@ if build_gwacom include_directories: [dir_src, dir_include], dependencies: deps_gwacom, install: false, + # Note: xorg-xserver.pc always appends -fvisibility=hidden so + # this is the only way to force default visibility c_args: ['-fvisibility=default'], ) @@ -346,6 +349,8 @@ if build_unittests dependencies: [dep_xserver, dep_m], name_prefix: '', # we want wacom_drv_test.so, not libwacom_drv_test.so install: false, + # Note: xorg-xserver.pc always appends -fvisibility=hidden so + # this is the only way to force default visibility c_args: ['-DENABLE_TESTS', '-fvisibility=default'], ) dep_dl = cc.find_library('dl') |