summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorGert Wollny <gert.wollny@collabora.com>2019-12-23 16:48:52 +0100
committerGert Wollny <gert.wollny@collabora.com>2019-12-27 10:00:56 +0100
commit1e581b6b49d5ba46e9dae8f271f6d585d89c9411 (patch)
tree90505e78d8c88224b8a34e88785f4fe45b2d8687 /meson.build
parent1686cf92a7c67b12ed90519e5cf6428eff4d9026 (diff)
meson: set visibility flag when compiler supports it
Since vtest_server and the tests make use of private interfaces we must mirror the autotoosl build that keeps the private interfaces in a static library so that these functions can be called by the test code. The main library that get installed then uses this static library and adds the exported interface. Closes #152 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build10
1 files changed, 10 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 682d7c8..85b6500 100644
--- a/meson.build
+++ b/meson.build
@@ -60,6 +60,16 @@ foreach w : warnings
endif
endforeach
+flags = [
+ '-fvisibility=hidden',
+]
+
+foreach f : flags
+ if cc.has_argument(f)
+ add_project_arguments(f, language : 'c')
+ endif
+endforeach
+
prog_python = import('python').find_installation('python3')
libdrm_dep = dependency('libdrm', version : '>=2.4.50')