diff options
author | David Robillard <d@drobilla.net> | 2019-07-28 00:14:34 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-07-29 01:59:36 +0200 |
commit | 3f98de4e20c372e87cba1031465e4ee470abbd46 (patch) | |
tree | 57493e2744985024a5353bfc1a0f217b1ccf59db | |
parent | 776c8622814ee3749909af5c47c75f5d26c03931 (diff) |
Set hidden visibility globally
-rw-r--r-- | wscript | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -48,9 +48,12 @@ def configure(conf): elif conf.env.TARGET_PLATFORM == 'darwin': conf.env.append_unique('CFLAGS', ['-Wno-deprecated-declarations']) - if Options.options.strict and not conf.env.MSVC_COMPILER: - conf.env.append_value('CFLAGS', ['-Wunused-parameter']) - conf.env.append_value('CXXFLAGS', ['-Wunused-parameter']) + if not conf.env.MSVC_COMPILER: + conf.env.append_value('LINKFLAGS', ['-fvisibility=hidden']) + for f in ('CFLAGS', 'CXXFLAGS'): + conf.env.append_value(f, ['-fvisibility=hidden']) + if Options.options.strict: + conf.env.append_value(f, ['-Wunused-parameter']) autowaf.set_c_lang(conf, 'c99') @@ -99,7 +102,7 @@ def build(bld): autowaf.build_pc(bld, 'PUGL', PUGL_VERSION, PUGL_MAJOR_VERSION, [], {'PUGL_MAJOR_VERSION': PUGL_MAJOR_VERSION}) - libflags = ['-fvisibility=hidden'] if not bld.env.MSVC_COMPILER else [] + libflags = [] framework = [] libs = [] lib_source = ['pugl/detail/implementation.c'] |