aboutsummaryrefslogtreecommitdiff
path: root/wscript
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-07-28 00:14:34 +0200
committerDavid Robillard <d@drobilla.net>2019-07-29 01:59:36 +0200
commit3f98de4e20c372e87cba1031465e4ee470abbd46 (patch)
tree57493e2744985024a5353bfc1a0f217b1ccf59db /wscript
parent776c8622814ee3749909af5c47c75f5d26c03931 (diff)
Set hidden visibility globally
Diffstat (limited to 'wscript')
-rw-r--r--wscript11
1 files changed, 7 insertions, 4 deletions
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']