bindings/python/wscript
changeset 4253 732b877beb23
parent 4196 ed59d07c5373
child 4255 07f1fdd8a33e
--- a/bindings/python/wscript	Tue Mar 03 10:57:42 2009 +0000
+++ b/bindings/python/wscript	Tue Mar 03 18:51:16 2009 +0000
@@ -15,7 +15,7 @@
 import Utils
 
 ## https://launchpad.net/pybindgen/
-REQUIRED_PYBINDGEN_VERSION = (0, 10, 0, 626)
+REQUIRED_PYBINDGEN_VERSION = (0, 10, 0, 630)
 REQUIRED_PYGCCXML_VERSION = (0, 9, 5)
 
 
@@ -70,6 +70,12 @@
         conf.report_optional_feature("python", "Python Bindings", False, str(ex))
         return
 
+    # -fvisibility=hidden optimization
+    if conf.env['CXX_NAME'] == 'gcc' and conf.env['CC_VERSION'] >= (4,0,0):
+        conf.env.append_value('CXXFLAGS_PYEXT', '-fvisibility=hidden')
+    if conf.env['CC_NAME'] == 'gcc' and conf.env['CC_VERSION'] >= (4,0,0):
+        conf.env.append_value('CCFLAGS_PYEXT', '-fvisibility=hidden')
+
     # Check for the location of pybindgen
     if Options.options.with_pybindgen is not None:
         if os.path.isdir(Options.options.with_pybindgen):