[evince/wip/chpe/symbols-visibility: 21/22] build: Use symbol visibility to hide symbols in private libs




commit db1dfc722b2ccffdf65e90dd618216f0917e304b
Author: Christian Persch <chpe src gnome org>
Date:   Sat Nov 20 22:40:56 2021 +0100

    build: Use symbol visibility to hide symbols in private libs
    
    Use the visibility attribute to hide all symbols from private
    convenience static libraries used in the backends.
    
    This removes lots of accidentally exposed, private functions.

 backend/dvi/mdvi-lib/meson.build | 1 +
 cut-n-paste/unarr/meson.build    | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/backend/dvi/mdvi-lib/meson.build b/backend/dvi/mdvi-lib/meson.build
index 2f4fb57a4..69e03705c 100644
--- a/backend/dvi/mdvi-lib/meson.build
+++ b/backend/dvi/mdvi-lib/meson.build
@@ -29,6 +29,7 @@ libmdvi = static_library(
   'mdvi',
   sources: sources,
   include_directories: top_inc,
+  gnu_symbol_visibility: 'hidden',
 )
 
 libmdvi_dep = declare_dependency(
diff --git a/cut-n-paste/unarr/meson.build b/cut-n-paste/unarr/meson.build
index 1ff05ff05..3f148c573 100644
--- a/cut-n-paste/unarr/meson.build
+++ b/cut-n-paste/unarr/meson.build
@@ -18,7 +18,8 @@ libunarr = static_library(
   'unarr',
   sources: sources,
   dependencies: zlib_dep,
-  c_args: [ '-DHAVE_ZLIB', '-DNDEBUG' ]
+  c_args: [ '-DHAVE_ZLIB', '-DNDEBUG' ],
+  gnu_symbol_visibility: 'hidden',
 )
 
 libunarr_dep = declare_dependency(


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