Branch: refs/heads/master Author: Enrico Tröger enrico.troeger@uvena.de Committer: Colomban Wendling ban@herbesfolles.org Date: Fri, 10 Apr 2015 14:16:05 UTC Commit: 43037b379b10637eca15dc5c2ce4de80abd73f0c https://github.com/geany/geany/commit/43037b379b10637eca15dc5c2ce4de80abd73f...
Log Message: ----------- waf: Implement check whether compiler supports -fvisibility=hidden
This is a bit better than compiler == 'gcc'. Tested with gcc 4.9 (success) and gcc 3.4.5 (not supported).
Modified Paths: -------------- wscript
Modified: wscript 5 lines changed, 2 insertions(+), 3 deletions(-) =================================================================== @@ -186,6 +186,7 @@ def configure(conf): conf.load('compiler_c') is_win32 = _target_is_win32(conf)
+ visibility_hidden_supported = conf.check_cc(cflags=['-Werror', '-fvisibility=hidden'], mandatory=False) conf.check_cc(header_name='fcntl.h', mandatory=False) conf.check_cc(header_name='fnmatch.h', mandatory=False) conf.check_cc(header_name='glob.h', mandatory=False) @@ -310,9 +311,7 @@ but you then may not have a local copy of the HTML manual.''' # GEANY_EXPORT_SYMBOL and GEANY_API_SYMBOL if is_win32: geany_symbol_flags = ['-DGEANY_EXPORT_SYMBOL=__declspec(dllexport)'] - # FIXME: check for -fvisibility and the __attribute__((visibility)), or - # at least for GCC >= 4 - elif conf.env['CC_NAME'] == 'gcc': + elif visibility_hidden_supported: geany_symbol_flags = ['-fvisibility=hidden', '-DGEANY_EXPORT_SYMBOL=__attribute__((visibility("default")))'] else: # unknown, define to nothing
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).