From: Matthias Clasen Date: Fri, 4 Aug 2023 02:49:08 +0000 (-0400) Subject: build: Set the default visibility X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~1^2~7^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=5c4bb1f93be369daa87466750b74e928a0ebdfa7;p=gtk4.git build: Set the default visibility While working on deprecation cleanups, I noticed that removing GDK_DEPRECATED_IN... from headers does not have the effect of making the symbols disappear, since we were forgetting to set the default visibility to hidden. --- diff --git a/meson.build b/meson.build index b99bf847b3..1c03a6cc48 100644 --- a/meson.build +++ b/meson.build @@ -339,15 +339,17 @@ else test_cflags = [] endif -common_cflags = cc.get_supported_arguments(test_cflags) - # Symbol visibility if get_option('default_library') != 'static' if os_win32 cdata.set('DLL_EXPORT', true) + else + test_cflags += ['-fvisibility=hidden'] endif endif +common_cflags = cc.get_supported_arguments(test_cflags) + common_ldflags = cc.get_supported_link_arguments([ '-Wl,-Bsymbolic', '-Wl,-z,relro',