Mesa (staging/20.2): meson: Fix Clang microsoft-enum-value detection.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Dec 7 20:46:35 UTC 2020


Module: Mesa
Branch: staging/20.2
Commit: 1012f0851d90544b4bb8edd4a66736e54076badc
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1012f0851d90544b4bb8edd4a66736e54076badc

Author: Vinson Lee <vlee at freedesktop.org>
Date:   Tue Nov 10 18:17:57 2020 -0800

meson: Fix Clang microsoft-enum-value detection.

Fixes: 3aee462781a ("meson: add windows compiler checks and libraries")
Signed-off-by: Vinson Lee <vlee at freedesktop.org>
Reviewed-by: Dylan Baker <dylan at pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7543>
(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 cbd1216abd0..d10adcae6e2 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 fbd3c4b8e8d..a8cfd72d443 100644
--- a/meson.build
+++ b/meson.build
@@ -992,10 +992,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',
@@ -1064,6 +1060,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



More information about the mesa-commit mailing list