OSX/scons: introducing and testing an unexported_symbols_list to prevent clashes...
authorJens Verwiebe <info@jensverwiebe.de>
Tue, 27 Nov 2012 11:38:59 +0000 (11:38 +0000)
committerJens Verwiebe <info@jensverwiebe.de>
Tue, 27 Nov 2012 11:38:59 +0000 (11:38 +0000)
SConstruct
source/creator/osx_locals.map [new file with mode: 0644]

index 5a1797ec1dcab135a9f06db71efd1a1bddeea74d..d6972de8cabdcde34daa1433b28373e6e218639c 100644 (file)
@@ -312,6 +312,9 @@ if env['OURPLATFORM']=='darwin':
         env.Append(LINKFLAGS=['-L'+OSX_OSL_LIBPATH,'-loslcomp','-force_load '+ OSX_OSL_LIBPATH +'/liboslexec.a','-loslquery'])
         env.Append(BF_PROGRAM_LINKFLAGS=['-Xlinker','-force_load','-Xlinker',OSX_OSL_LIBPATH +'/liboslexec.a'])
 
+    # Trying to get rid of eventually clashes, we export some explicite as local symbols               
+    env.Append(LINKFLAGS=['-Xlinker','-unexported_symbols_list','-Xlinker','./source/creator/osx_locals.map'])
+
 if env['WITH_BF_OPENMP'] == 1:
         if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
                 env['CCFLAGS'].append('/openmp')
diff --git a/source/creator/osx_locals.map b/source/creator/osx_locals.map
new file mode 100644 (file)
index 0000000..c3dd8b6
--- /dev/null
@@ -0,0 +1,3 @@
+## The symbols will be treated as if they were marked as __private_extern__
+## (aka visibility=hidden) and will not be global in the output file
+*boost*