diff --git a/bindings/python/wscript b/bindings/python/wscript index d30b668c9..aea021196 100644 --- a/bindings/python/wscript +++ b/bindings/python/wscript @@ -15,7 +15,7 @@ import Build 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 @@ def configure(conf): 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):