mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-04 10:16:17 +01:00
Meson: Add -Wl,-z,nodelete and -Wl,-Bsymbolic-functions where supported
https://bugzilla.gnome.org/show_bug.cgi?id=788771
This commit is contained in:
parent
9d12af9ef8
commit
a67dc37e9c
10
meson.build
10
meson.build
@ -1,6 +1,6 @@
|
|||||||
project('glib', 'c', 'cpp',
|
project('glib', 'c', 'cpp',
|
||||||
version : '2.57.0',
|
version : '2.57.0',
|
||||||
meson_version : '>= 0.45.0',
|
meson_version : '>= 0.46.0',
|
||||||
default_options : [
|
default_options : [
|
||||||
'buildtype=debugoptimized',
|
'buildtype=debugoptimized',
|
||||||
'warning_level=1',
|
'warning_level=1',
|
||||||
@ -337,11 +337,19 @@ if cc.get_id() == 'gcc' or cc.get_id() == 'clang'
|
|||||||
'-Werror=missing-prototypes',
|
'-Werror=missing-prototypes',
|
||||||
'-Werror=pointer-arith',
|
'-Werror=pointer-arith',
|
||||||
]
|
]
|
||||||
|
test_c_link_args = [
|
||||||
|
'-Wl,-z,nodelete',
|
||||||
|
]
|
||||||
|
if get_option('bsymbolic_functions')
|
||||||
|
test_c_link_args += ['-Wl,-Bsymbolic-functions']
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
test_c_args = []
|
test_c_args = []
|
||||||
|
test_c_link_args = []
|
||||||
endif
|
endif
|
||||||
|
|
||||||
add_project_arguments(cc.get_supported_arguments(test_c_args), language: 'c')
|
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+)
|
# Windows Support (Vista+)
|
||||||
if host_system == 'windows'
|
if host_system == 'windows'
|
||||||
|
@ -63,3 +63,8 @@ option('gtk_doc',
|
|||||||
type : 'boolean',
|
type : 'boolean',
|
||||||
value : false,
|
value : false,
|
||||||
description : 'use gtk-doc to build documentation')
|
description : 'use gtk-doc to build documentation')
|
||||||
|
|
||||||
|
option('bsymbolic_functions',
|
||||||
|
type : 'boolean',
|
||||||
|
value : true,
|
||||||
|
description : 'link with -Bsymbolic-functions if supported')
|
||||||
|
Loading…
Reference in New Issue
Block a user