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>
This commit is contained in:
Vinson Lee 2020-11-10 18:17:57 -08:00 committed by Marge Bot
parent ef9362acb8
commit bb46a010bb
1 changed files with 5 additions and 4 deletions

View File

@ -1030,10 +1030,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',
@ -1102,6 +1098,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