meson: use -Wl,-Bsymbolic-functions where supported
authorTim-Philipp Müller <tim@centricular.com>
Wed, 25 Apr 2018 10:01:01 +0000 (11:01 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Wed, 25 Apr 2018 10:01:01 +0000 (11:01 +0100)
Just like the autotools build.

meson.build

index 2aeea515e56248b67e0a7196531903b428e7046e..46dcb4c3464d2d3402258577e8b4dc4eb4d0905e 100644 (file)
@@ -1,6 +1,6 @@
 project('gst-editing-services', 'c',
   version : '1.15.0.1',
-  meson_version : '>= 0.36.0',
+  meson_version : '>= 0.46.0',
   default_options : [ 'warning_level=1',
                       'buildtype=debugoptimized' ])
 
@@ -40,6 +40,10 @@ if cc.get_id() == 'msvc'
       language : 'c')
 endif
 
+if cc.has_link_argument('-Wl,-Bsymbolic-functions')
+  add_project_link_arguments('-Wl,-Bsymbolic-functions', language : 'c')
+endif
+
 # Symbol visibility
 if cc.has_argument('-fvisibility=hidden')
   add_project_arguments('-fvisibility=hidden', language: 'c')