meson: don't error on formaters with mingw

MSVC is generally happy, but mingw errors. I've spent as much time
(several days) trying to squash all of these warnings and I'm done with
it, just leave them as warnings with MinGW.

Acked-by: Kristian H. Kristensen <hoegsberg@google.com>
This commit is contained in:
Dylan Baker
2019-06-27 14:52:40 -07:00
parent 1e2c05b82a
commit fe8f8981d0

View File

@@ -937,28 +937,41 @@ if cc.get_id() == 'msvc'
cpp_args += '-Wno-microsoft-enum-value' cpp_args += '-Wno-microsoft-enum-value'
endif endif
else else
foreach a : ['-Werror=implicit-function-declaration', _trial = [
'-Werror=missing-prototypes', '-Werror=implicit-function-declaration',
'-Werror=return-type', '-Werror=missing-prototypes',
'-Werror=incompatible-pointer-types', '-Werror=return-type',
'-Werror=format', '-Werror=incompatible-pointer-types',
'-Wformat-security', '-Wno-missing-field-initializers',
'-Wno-missing-field-initializers', '-Wno-format-truncation',
'-Wno-format-truncation', '-fno-math-errno',
'-fno-math-errno', '-fno-trapping-math',
'-fno-trapping-math', '-Qunused-arguments',
'-Qunused-arguments'] ]
# MinGW chokes on format specifiers and I can't get it all working
if not (cc.get_id() == 'gcc' and host_machine.system() == 'windows')
_trial += ['-Werror=format', '-Wformat-security']
endif
foreach a : _trial
if cc.has_argument(a) if cc.has_argument(a)
c_args += a c_args += a
endif endif
endforeach endforeach
# Check for generic C++ arguments _trial = [
foreach a : ['-Werror=return-type', '-Werror=return-type',
'-Werror=format', '-Wno-non-virtual-dtor',
'-Wformat-security', '-Wno-missing-field-initializers',
'-fno-math-errno', '-fno-trapping-math', '-Wno-format-truncation',
'-Qunused-arguments'] '-fno-math-errno',
'-fno-trapping-math',
'-Qunused-arguments',
]
# MinGW chokes on format specifiers and I can't get it all working
if not (cc.get_id() == 'gcc' and host_machine.system() == 'windows')
_trial += ['-Werror=format', '-Wformat-security']
endif
foreach a : _trial
if cpp.has_argument(a) if cpp.has_argument(a)
cpp_args += a cpp_args += a
endif endif
@@ -974,20 +987,6 @@ else
c_vis_args += '-fvisibility=hidden' c_vis_args += '-fvisibility=hidden'
endif endif
foreach a : ['-Werror=return-type',
'-Werror=format',
'-Wformat-security',
'-Wno-non-virtual-dtor',
'-Wno-missing-field-initializers',
'-Wno-format-truncation',
'-fno-math-errno',
'-fno-trapping-math',
'-Qunused-arguments']
if cpp.has_argument(a)
cpp_args += a
endif
endforeach
# Check for C and C++ arguments for MSVC2013 compatibility. These are only # Check for C and C++ arguments for MSVC2013 compatibility. These are only
# used in parts of the mesa code base that need to compile with old versions # used in parts of the mesa code base that need to compile with old versions
# of MSVC, mainly common code # of MSVC, mainly common code