From 3f98de4e20c372e87cba1031465e4ee470abbd46 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 28 Jul 2019 00:14:34 +0200 Subject: Set hidden visibility globally --- wscript | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'wscript') diff --git a/wscript b/wscript index 400d5c4..2a92177 100644 --- a/wscript +++ b/wscript @@ -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'] -- cgit v1.2.1