move -fvisibility=hidden to the top of the source tree, and remove its internal use...
authorPaul Davis <paul@linuxaudiosystems.com>
Sun, 12 Jan 2014 16:34:37 +0000 (11:34 -0500)
committerPaul Davis <paul@linuxaudiosystems.com>
Sun, 12 Jan 2014 20:40:47 +0000 (15:40 -0500)
libs/ardour/wscript
libs/audiographer/wscript
libs/canvas/wscript
libs/gtkmm2ext/wscript
libs/midi++2/wscript
libs/pbd/wscript
libs/surfaces/control_protocol/wscript
wscript

index 29efde269360d42c2af8607ff87bc1f94e637c18..91326f637298daab0e2764d51dc95fc76f3789b5 100644 (file)
@@ -326,8 +326,6 @@ def build(bld):
         obj              = bld.shlib(features = 'c cxx cshlib cxxshlib', source=libardour_sources)
         # macros for this shared library
         obj.defines      = [ 'LIBARDOUR_DLL_EXPORTS=1' ]
-        obj.cflags       = [ '-fvisibility=hidden' ]
-        obj.cxxflags     = [ '-fvisibility=hidden' ]
     else:
         obj              = bld.stlib(features = 'c cxx cstlib cxxstlib', source=libardour_sources)
         obj.cxxflags     = [ '-fPIC' ]
@@ -343,7 +341,7 @@ def build(bld):
                         'OSX','BOOST','CURL','DL']
     obj.use          = ['libpbd','libmidipp','libevoral', 'libvampplugin',
                         'libaudiographer', 
-                        'libtimecode_includes',
+                        'libtimecode',
                         ]
     if bld.is_defined('USE_EXTERNAL_LIBS'):
         obj.uselib.extend(['RUBBERBAND', 'TAGLIB', 'VAMPSDK', 'LIBLTC',
index 183b272518114cef62f3abcdea5b8cb395b2009e..f2920a6c7f5e8099bdd9f2fb9cdb8ab432064d59 100644 (file)
@@ -68,8 +68,6 @@ def build(bld):
         audiographer              = bld.shlib(features = 'c cxx cshlib cxxshlib', source=audiographer_sources)
         # macros for this shared library
         audiographer.defines      = [ 'LIBAUDIOGRAPHER_DLL_EXPORTS=1' ]
-        audiographer.cflags       = [ '-fvisibility=hidden' ]
-        audiographer.cxxflags     = [ '-fvisibility=hidden' ]
     else:
         audiographer              = bld.stlib(features = 'c cxx cstlib cxxstlib', source=libardour_sources)
         audiographer.cxxflags     = [ '-fPIC' ]
index 9503bfe3eca891556ba9351903ff2485c3703c3f..59b25262548597e1f7615a99eaafd7d3fef68ad8 100644 (file)
@@ -72,8 +72,6 @@ def build(bld):
     if bld.is_defined ('INTERNAL_SHARED_LIBS'):
         obj = bld.shlib(features = 'cxx cxxshlib', source=canvas_sources)
         obj.defines      = [ 'LIBCANVAS_DLL_EXPORTS=1' ]
-        obj.cflags       = [ '-fvisibility=hidden' ]
-        obj.cxxflags     = [ '-fvisibility=hidden' ]
     else:
         obj = bld.stlib(features = 'cxx cxxstlib', source=canvas_sources)
         obj.cxxflags     = [ '-fPIC' ]
index bae2fbe4396f4f07df6fb5f5365e3ddad181ed7e..48895a698ce4e4facdb6a9be924975a1253d201f 100644 (file)
@@ -88,8 +88,6 @@ def build(bld):
         obj              = bld.shlib(features = 'c cxx cshlib cxxshlib', source=gtkmm2ext_sources)
         # defines for this library
         obj.defines      = [ 'LIBGTKMM2EXT_DLL_EXPORTS', 'ABSTRACT_UI_EXPORTS' ]
-        obj.cxxflags     = [ '-fvisibility=hidden' ]
-        obj.cflags     = [ '-fvisibility=hidden' ]
     else:
         obj              = bld.stlib(features = 'c cxx cstlib cxxstlib', source=gtkmm2ext_sources)
         obj.cxxflags     = [ '-fPIC' ]
index a42d909e65e487810df8de019b5065ba9efc22e5..928b381326815b0aef7bd6fe583b81999b8ebbd7 100644 (file)
@@ -62,8 +62,6 @@ def build(bld):
     if bld.is_defined ('INTERNAL_SHARED_LIBS'):
         obj              = bld.shlib(features = 'cxx cxxshlib', source=libmidi_sources)
         obj.defines      = [ 'LIBMIDIPP_DLL_EXPORTS=1' ]
-        obj.cxxflags     = [ '-fvisibility=hidden' ]
-        obj.cflags       = [ '-fvisibility=hidden' ]
     else:
         obj              = bld.stlib(features = 'cxx cxxstlib', source=libmidi_sources)
         obj.cxxflags     = [ '-fPIC' ]
@@ -75,7 +73,7 @@ def build(bld):
     obj.name         = 'libmidipp'
     obj.target       = 'midipp'
     obj.uselib       = 'GLIBMM SIGCPP XML OSX'
-    obj.use          = 'libpbd libevoral libtimecode libtimecode_includes'
+    obj.use          = 'libpbd libevoral libtimecode'
     obj.vnum         = LIBMIDIPP_LIB_VERSION
     obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
 
index d721a78675e479f04b4703985b072b8ab5fffb6c..6b3e12b5396e9818f680c03c784a5cfc5ee24b57 100644 (file)
@@ -116,8 +116,6 @@ def build(bld):
         print('BUILD SHARED LIB')
         obj              = bld.shlib(features = 'cxx cxxshlib', source=libpbd_sources)
         obj.defines = [ 'LIBPBD_DLL_EXPORTS=1' ]
-        obj.cxxflags = [ '-fvisibility=hidden' ]
-        obj.cflags = [ '-fvisibility=hidden' ]
     else:
         print('BUILD STATIC LIB')
         obj              = bld.stlib(features = 'cxx cxxstlib', source=libpbd_sources)
index c79a3a2dbc31e520172a1f35b88c73ef7abb417c..f14cee042f27106156aa873d8e7121a12d7ddd6d 100644 (file)
@@ -29,8 +29,6 @@ def build(bld):
         obj              = bld.shlib(features = 'c cxx cshlib cxxshlib', source=controlcp_sources)
         # defines for this library
         obj.defines      = [ 'LIBCONTROLCP_DLL_EXPORTS' ]
-        obj.cxxflags     = [ '-fvisibility=hidden' ]
-        obj.cflags       = [ '-fvisibility=hidden' ]
     else:
         obj              = bld.stlib(features = 'c cxx cstlib cxxstlib', source=controlcp_sources)
         obj.cxxflags     = [ '-fPIC' ]
diff --git a/wscript b/wscript
index a0b439e48c6f86a451f5696019dc0908c8ad20e0..f665ff9a2f027b91696406460c5aa3018951594b 100644 (file)
--- a/wscript
+++ b/wscript
@@ -694,8 +694,19 @@ def configure(conf):
     conf.env.append_value('CFLAGS', '-DWAF_BUILD')
     conf.env.append_value('CXXFLAGS', '-DWAF_BUILD')
 
-    # Set up waf environment and C defines
     opts = Options.options
+
+    # Adopt Microsoft-like convention that makes all non-explicitly exported
+    # symbols invisible (rather than doing this all over the wscripts in the src tree)
+    #
+    # This won't apply to MSVC but that hasn't been added as a target yet
+    #
+    # We can't do this till all tests are complete, since some fail if this is et.
+    if opts.internal_shared_libs:
+        conf.env.append_value ('CXXFLAGS', '-fvisibility=hidden')
+        conf.env.append_value ('CFLAGS', '-fvisibility=hidden')
+
+    # Set up waf environment and C defines
     if opts.phone_home:
         conf.define('PHONE_HOME', 1)
         conf.env['PHONE_HOME'] = True