glib, gio tests: Apply the same rules to both gcc and clang when appropriate

This commit is contained in:
Marco Trevisan (Treviño) 2024-05-09 19:01:27 +02:00
parent 0dec04c504
commit 419e5b971b
2 changed files with 6 additions and 6 deletions

View File

@ -89,7 +89,7 @@ gio_tests = {
'g-file-info' : {
# FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/3070
# FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/3148
'can_fail' : host_system in ['darwin', 'gnu'] or host_system == 'windows' and cc.get_id() != 'gcc',
'can_fail' : host_system in ['darwin', 'gnu'] or host_system == 'windows' and not glib_gnu_cc_compiler,
},
'g-icon' : {},
'gdbus-addresses' : {},
@ -995,7 +995,7 @@ if not meson.is_cross_build()
'-nostdlib', '@INPUT@', '-o','@OUTPUT@'])
# Rename symbol to match the one in the C file
if cc.get_id() == 'gcc' and host_system == 'windows'
if glib_gnu_cc_compiler and host_system == 'windows'
underscore = '_'
else
underscore = ''

View File

@ -2,7 +2,7 @@ glib_tests = {
'array-test' : {},
'asyncqueue' : {},
'atomic' : {
'c_args' : cc.get_id() == 'gcc' ? ['-Wstrict-aliasing=2'] : [],
'c_args' : glib_gnu_cc_compiler ? ['-Wstrict-aliasing=2'] : [],
'c_standards': c_standards.keys(),
},
'base64' : {},
@ -151,13 +151,13 @@ glib_tests = {
},
'strfuncs' : {},
'string' : {
'c_args' : cc.get_id() == 'gcc' ? ['-Werror=sign-conversion'] : [],
'c_args' : glib_gnu_cc_compiler ? ['-Werror=sign-conversion'] : [],
},
'strvbuilder' : {},
'testing' : {
'args': [ '--verbose' ],
'extra_programs' : ['testing-helper'],
'c_args' : cc.get_id() == 'gcc' ? ['-Werror=sign-conversion'] : [],
'c_args' : glib_gnu_cc_compiler ? ['-Werror=sign-conversion'] : [],
},
'test-printf' : {},
'thread' : {},
@ -170,7 +170,7 @@ glib_tests = {
'types' : {},
'utf8-performance' : {},
'utf8-pointer' : {
'c_args' : cc.get_id() == 'gcc' ? ['-Werror=cast-qual'] : [],
'c_args' : glib_gnu_cc_compiler ? ['-Werror=cast-qual'] : [],
},
'utf8-validate' : {},
'utf8-misc' : {},