[gtksourceview] build: apply correctly HIDDEN_VISIBILITY_CFLAGS



commit 0c3d5ef1abcaa9bde12dec6c9be46e3b00710279
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Fri Apr 14 13:21:10 2017 +0200

    build: apply correctly HIDDEN_VISIBILITY_CFLAGS
    
    It was applied only to the real libtool library. But all the source code
    is compiled into the helper libtool libraries libgtksourceview-core.la
    and libgtksourcecompletionwords.la. So the -fvisibility=hidden was
    actually not applied!
    
    The unit tests are still able to call private symbols because the
    -export-dynamic LDFLAG is applied only to the real library.
    
    When running:
    $ nm -D libgtksourceview-4.so | grep T
    before and after this commit, the only difference is that
    gtksourceview_get_resource() is no longer exported, which is fine
    because it was exported by mistake, the function permits to access the
    internal GResources.
    
    Thanksfully, the other private symbols were marked with G_GNUC_INTERNAL,
    otherwise all private symbols would have been exported.

 gtksourceview/Makefile.am                          |    3 ++-
 .../completion-providers/words/Makefile.am         |    1 +
 2 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtksourceview/Makefile.am b/gtksourceview/Makefile.am
index 6c593ff..d31a875 100644
--- a/gtksourceview/Makefile.am
+++ b/gtksourceview/Makefile.am
@@ -158,7 +158,8 @@ libgtksourceview_core_la_SOURCES =          \
 nodist_libgtksourceview_core_la_SOURCES = \
        $(BUILT_SOURCES)
 
-libgtksourceview_core_la_CFLAGS =      \
+libgtksourceview_core_la_CFLAGS =      \
+       $(HIDDEN_VISIBILITY_CFLAGS)     \
        $(CODE_COVERAGE_CFLAGS)
 
 libgtksourceview_core_la_LDFLAGS =     \
diff --git a/gtksourceview/completion-providers/words/Makefile.am 
b/gtksourceview/completion-providers/words/Makefile.am
index 2e4c1e5..68551d5 100644
--- a/gtksourceview/completion-providers/words/Makefile.am
+++ b/gtksourceview/completion-providers/words/Makefile.am
@@ -31,6 +31,7 @@ libgtksourcecompletionwords_la_SOURCES =      \
        $(NOINST_H_FILES)
 
 libgtksourcecompletionwords_la_CFLAGS =                \
+       $(HIDDEN_VISIBILITY_CFLAGS)             \
        $(CODE_COVERAGE_CFLAGS)
 
 libgtksourcecompletionwords_la_LDFLAGS =       \


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