mirror of
https://gitee.com/openharmony/third_party_mesa3d
synced 2025-02-20 01:52:49 +00:00
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:
parent
1e2c05b82a
commit
fe8f8981d0
61
meson.build
61
meson.build
@ -937,28 +937,41 @@ if cc.get_id() == 'msvc'
|
||||
cpp_args += '-Wno-microsoft-enum-value'
|
||||
endif
|
||||
else
|
||||
foreach a : ['-Werror=implicit-function-declaration',
|
||||
'-Werror=missing-prototypes',
|
||||
'-Werror=return-type',
|
||||
'-Werror=incompatible-pointer-types',
|
||||
'-Werror=format',
|
||||
'-Wformat-security',
|
||||
'-Wno-missing-field-initializers',
|
||||
'-Wno-format-truncation',
|
||||
'-fno-math-errno',
|
||||
'-fno-trapping-math',
|
||||
'-Qunused-arguments']
|
||||
_trial = [
|
||||
'-Werror=implicit-function-declaration',
|
||||
'-Werror=missing-prototypes',
|
||||
'-Werror=return-type',
|
||||
'-Werror=incompatible-pointer-types',
|
||||
'-Wno-missing-field-initializers',
|
||||
'-Wno-format-truncation',
|
||||
'-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 cc.has_argument(a)
|
||||
c_args += a
|
||||
endif
|
||||
endforeach
|
||||
|
||||
# Check for generic C++ arguments
|
||||
foreach a : ['-Werror=return-type',
|
||||
'-Werror=format',
|
||||
'-Wformat-security',
|
||||
'-fno-math-errno', '-fno-trapping-math',
|
||||
'-Qunused-arguments']
|
||||
_trial = [
|
||||
'-Werror=return-type',
|
||||
'-Wno-non-virtual-dtor',
|
||||
'-Wno-missing-field-initializers',
|
||||
'-Wno-format-truncation',
|
||||
'-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)
|
||||
cpp_args += a
|
||||
endif
|
||||
@ -974,20 +987,6 @@ else
|
||||
c_vis_args += '-fvisibility=hidden'
|
||||
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
|
||||
# used in parts of the mesa code base that need to compile with old versions
|
||||
# of MSVC, mainly common code
|
||||
|
Loading…
x
Reference in New Issue
Block a user