meson: Fix Clang microsoft-enum-value detection.

Fixes: 3aee462781 ("meson: add windows compiler checks and libraries")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7543>
(cherry picked from commit bb46a010bb)
This commit is contained in:
Vinson Lee 2020-11-10 18:17:57 -08:00 committed by Dylan Baker
parent 03e8cc7ca9
commit dfadf838ae
2 changed files with 6 additions and 5 deletions

View file

@ -301,7 +301,7 @@
"description": "meson: Fix Clang microsoft-enum-value detection.",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": "3aee462781abc0bfcce207fb64f9199b43a57542"
},

View file

@ -1002,10 +1002,6 @@ if cc.get_id() == 'msvc'
cpp_args += a
endif
endforeach
if cc.has_argument('-Wmicrosoft-enum-value') # Clang
c_args += '-Wno-microsoft-enum-value'
cpp_args += '-Wno-microsoft-enum-value'
endif
else
_trial = [
'-Werror=implicit-function-declaration',
@ -1074,6 +1070,11 @@ else
cpp_msvc_compat_args += a
endif
endforeach
if cc.has_argument('-Wmicrosoft-enum-value') # Clang
c_args += '-Wno-microsoft-enum-value'
cpp_args += '-Wno-microsoft-enum-value'
endif
endif
# set linker arguments