[libgit2-glib] meson: use -Bsymbolic-functions only when supported



commit 02c64269c5d48f015f3041d42f283a3ce0774461
Author: Tom Schoonjans <Tom Schoonjans diamond ac uk>
Date:   Mon Apr 22 12:36:32 2019 +0100

    meson: use -Bsymbolic-functions only when supported
    
    Closes GNOME/gitg#115

 libgit2-glib/meson.build | 7 -------
 meson.build              | 5 +++++
 2 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/libgit2-glib/meson.build b/libgit2-glib/meson.build
index a6cb0c4..6314a4d 100644
--- a/libgit2-glib/meson.build
+++ b/libgit2-glib/meson.build
@@ -205,12 +205,6 @@ platform_deps = [
   libgit2_dep,
 ]
 
-if cc.get_id() == 'msvc'
-  libgit2_glib_link_args = []
-else
-  libgit2_glib_link_args = ['-Wl,-Bsymbolic-functions']
-endif
-
 libgit2_glib = shared_library(
   'git2-glib-' + libgit2_glib_api_version,
   version: libversion,
@@ -219,7 +213,6 @@ libgit2_glib = shared_library(
   include_directories: top_inc,
   dependencies: platform_deps,
   c_args: cflags + ['-DG_LOG_DOMAIN="@0@"'.format(libgit2_glib_ns)],
-  link_args: libgit2_glib_link_args,
   install: true,
 )
 
diff --git a/meson.build b/meson.build
index 29d73ce..6cddb2d 100644
--- a/meson.build
+++ b/meson.build
@@ -106,6 +106,11 @@ endif
 
 add_project_arguments(common_flags, language: 'c')
 
+if cc.has_link_argument('-Wl,-Bsymbolic-functions')
+  add_project_link_arguments('-Wl,-Bsymbolic-functions', language : 'c')
+endif
+
+
 # Termios
 have_termios = cc.has_header('termios.h')
 


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