[glib: 1/2] tests: Disable link-time warning for mem-overflow
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 1/2] tests: Disable link-time warning for mem-overflow
- Date: Wed, 4 Mar 2020 10:18:15 +0000 (UTC)
commit 43dbf98687a0f7560ebb32c1b2511c7ae6b3ab7c
Author: nightuser <22158-nightuser users noreply gitlab gnome org>
Date: Tue Mar 3 23:46:31 2020 +0300
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.
glib/tests/meson.build | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/glib/tests/meson.build b/glib/tests/meson.build
index 3dedafcdb..8da477d19 100644
--- a/glib/tests/meson.build
+++ b/glib/tests/meson.build
@@ -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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]