mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-14 00:06:24 +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-escape' : {},
|
||||
'markup-subparser' : {},
|
||||
'mem-overflow' : {},
|
||||
'mem-overflow' : {
|
||||
'link_args' : cc.get_id() == 'gcc' and cc.version().version_compare('> 6')
|
||||
? ['-Wno-alloc-size-larger-than'] : [],
|
||||
},
|
||||
'mutex' : {},
|
||||
'node' : {},
|
||||
'once' : {},
|
||||
@ -220,6 +223,7 @@ foreach test_name, extra_args : glib_tests
|
||||
|
||||
exe = executable(test_name, source,
|
||||
c_args : test_cargs + extra_args.get('c_args', []),
|
||||
link_args : extra_args.get('link_args', []),
|
||||
dependencies : test_deps + extra_args.get('dependencies', []),
|
||||
install_dir: installed_tests_execdir,
|
||||
install: install,
|
||||
|
Loading…
Reference in New Issue
Block a user