meson: hide symbols by default unless explicitly exported

This commit is contained in:
Tim-Philipp Müller 2017-08-11 13:59:04 +01:00
parent d1eb5f727c
commit 57b542c5e5

View file

@ -53,6 +53,14 @@ else
noseh_link_args = []
endif
# Symbol visibility
if cc.has_argument('-fvisibility=hidden')
add_project_arguments('-fvisibility=hidden', language: 'c')
endif
if cxx.has_argument('-fvisibility=hidden')
add_project_arguments('-fvisibility=hidden', language: 'cpp')
endif
cdata = configuration_data()
check_headers = [
['HAVE_DLFCN_H', 'dlfcn.h'],