[libadwaita] Remove manual application of -fvisibility=hidden



commit 543aae42b203c7c438ba8af44cf5f1ea03f06512
Author: Tristan Partin <tristan partin io>
Date:   Wed Oct 27 11:46:19 2021 -0500

    Remove manual application of -fvisibility=hidden
    
    Meson provides an easy way to set it using gnu_symbol_visibilty.

 src/meson.build | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)
---
diff --git a/src/meson.build b/src/meson.build
index 2560fe40..42dd2297 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -228,12 +228,8 @@ config_h.set_quoted('LOCALEDIR', get_option('prefix') / get_option('localedir'))
 if target_system == 'windows'
   config_h.set('DLL_EXPORT', true)
   config_h.set('_ADW_EXTERN', '__declspec(dllexport) extern')
-  if cc.get_id() != 'msvc'
-    libadwaita_c_args += ['-fvisibility=hidden']
-  endif
 else
   config_h.set('_ADW_EXTERN', '__attribute__((visibility("default"))) extern')
-  libadwaita_c_args += ['-fvisibility=hidden']
 endif
 
 configure_file(
@@ -262,13 +258,14 @@ libadwaita = shared_library(
   'adwaita-' + apiversion,
   libadwaita_sources,
 
-            soversion: soversion,
-               c_args: libadwaita_c_args,
-         dependencies: libadwaita_deps,
-  include_directories: [ root_inc, src_inc ],
-              install: true,
-            link_args: libadwaita_link_args,
-          install_dir: adwaita_libdir,
+              soversion: soversion,
+                 c_args: libadwaita_c_args,
+           dependencies: libadwaita_deps,
+    include_directories: [ root_inc, src_inc ],
+                install: true,
+              link_args: libadwaita_link_args,
+            install_dir: adwaita_libdir,
+  gnu_symbol_visibility: 'hidden',
 )
 
 libadwaita_dep = declare_dependency(


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]