From dfadf838aef2a232e2f900c47ea0e88de0ef6d0e Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Tue, 10 Nov 2020 18:17:57 -0800 Subject: [PATCH] meson: Fix Clang microsoft-enum-value detection. Fixes: 3aee462781a ("meson: add windows compiler checks and libraries") Signed-off-by: Vinson Lee Reviewed-by: Dylan Baker Part-of: (cherry picked from commit bb46a010bbe9f703ff9d48e450dbd6529906b8e9) --- .pick_status.json | 2 +- meson.build | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 279cf4bcd90..741273d24c7 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -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" }, diff --git a/meson.build b/meson.build index b0107a2a32a..c2843a30766 100644 --- a/meson.build +++ b/meson.build @@ -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