mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-14 16:26:17 +01:00
tests: Disable link-time warning for mem-overflow
`mem-overflow` test disables GCC warning `alloc-size-larger-than` via diagnostic pragma, but it's still emitted in the linkage stage when LTO is enabled. This changes explicitly set `link_args` for the test to disable the warning.
This commit is contained in:
parent
66af0d2a7d
commit
43dbf98687
@ -47,7 +47,10 @@ glib_tests = {
|
|||||||
'markup-collect' : {},
|
'markup-collect' : {},
|
||||||
'markup-escape' : {},
|
'markup-escape' : {},
|
||||||
'markup-subparser' : {},
|
'markup-subparser' : {},
|
||||||
'mem-overflow' : {},
|
'mem-overflow' : {
|
||||||
|
'link_args' : cc.get_id() == 'gcc' and cc.version().version_compare('> 6')
|
||||||
|
? ['-Wno-alloc-size-larger-than'] : [],
|
||||||
|
},
|
||||||
'mutex' : {},
|
'mutex' : {},
|
||||||
'node' : {},
|
'node' : {},
|
||||||
'once' : {},
|
'once' : {},
|
||||||
@ -220,6 +223,7 @@ foreach test_name, extra_args : glib_tests
|
|||||||
|
|
||||||
exe = executable(test_name, source,
|
exe = executable(test_name, source,
|
||||||
c_args : test_cargs + extra_args.get('c_args', []),
|
c_args : test_cargs + extra_args.get('c_args', []),
|
||||||
|
link_args : extra_args.get('link_args', []),
|
||||||
dependencies : test_deps + extra_args.get('dependencies', []),
|
dependencies : test_deps + extra_args.get('dependencies', []),
|
||||||
install_dir: installed_tests_execdir,
|
install_dir: installed_tests_execdir,
|
||||||
install: install,
|
install: install,
|
||||||
|
Loading…
Reference in New Issue
Block a user