Parcourir la source

meson: add visibility argument

Alexandre Janniaux il y a 5 ans
Parent
commit
841d2ff01b
1 fichiers modifiés avec 6 ajouts et 0 suppressions
  1. 6 0
      meson.build

+ 6 - 0
meson.build

@@ -17,6 +17,12 @@ conf_data.set('_DEFAULT_SOURCE', 1)
 
 cc = meson.get_compiler('c')
 
+# Add -fvisibility=hidden if compiler supports those
+add_project_arguments(
+    cc.get_supported_arguments('-fvisibility=hidden'),
+    language : ['c'])
+
+
 optional_arguments = [
   '-Wall',
   '-Wsign-compare',