Commit a67dc37e authored by Xavier Claessens's avatar Xavier Claessens

Meson: Add -Wl,-z,nodelete and -Wl,-Bsymbolic-functions where supported

https://bugzilla.gnome.org/show_bug.cgi?id=788771
parent 9d12af9e
project('glib', 'c', 'cpp',
version : '2.57.0',
meson_version : '>= 0.45.0',
meson_version : '>= 0.46.0',
default_options : [
'buildtype=debugoptimized',
'warning_level=1',
......@@ -337,11 +337,19 @@ if cc.get_id() == 'gcc' or cc.get_id() == 'clang'
'-Werror=missing-prototypes',
'-Werror=pointer-arith',
]
test_c_link_args = [
'-Wl,-z,nodelete',
]
if get_option('bsymbolic_functions')
test_c_link_args += ['-Wl,-Bsymbolic-functions']
endif
else
test_c_args = []
test_c_link_args = []
endif
add_project_arguments(cc.get_supported_arguments(test_c_args), language: 'c')
add_project_link_arguments(cc.get_supported_link_arguments(test_c_link_args), language: 'c')
# Windows Support (Vista+)
if host_system == 'windows'
......
......@@ -63,3 +63,8 @@ option('gtk_doc',
type : 'boolean',
value : false,
description : 'use gtk-doc to build documentation')
option('bsymbolic_functions',
type : 'boolean',
value : true,
description : 'link with -Bsymbolic-functions if supported')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment