Module: Mesa
Branch: staging/23.3
Commit: 676fd7a287a0509a2903f748bca631f05894fd00
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=676fd7a287a0509a2903f748bca631f05894fd00

Author: Karol Herbst <[email protected]>
Date:   Wed Dec 20 23:08:34 2023 +0100

rusticl: check rustc version for flags requiring newer rustc/clippy

Fixes: 7e74ee07e3a ("rusticl: silence clippy::arc-with-non-send-sync for now")
Signed-off-by: Karol Herbst <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26780>
(cherry picked from commit 9643671dae06701fa5ad926b6f30909407d1f8ac)

---

 .pick_status.json                         | 2 +-
 meson.build                               | 1 +
 src/gallium/frontends/rusticl/meson.build | 9 +++++++--
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 6ea6ab5751d..7b16caa7276 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -264,7 +264,7 @@
         "description": "rusticl: check rustc version for flags requiring newer 
rustc/clippy",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "7e74ee07e3a7aebc46cbd6d724b49790cb9f9c29",
         "notes": null
diff --git a/meson.build b/meson.build
index fbb0b29322d..35cc5f1cd5f 100644
--- a/meson.build
+++ b/meson.build
@@ -796,6 +796,7 @@ if with_gallium_rusticl
   endif
 
   add_languages('rust', required: true)
+  rustc = meson.get_compiler('rust')
 
   with_clc = true
 endif
diff --git a/src/gallium/frontends/rusticl/meson.build 
b/src/gallium/frontends/rusticl/meson.build
index 279bd8d4d5a..32a8bb85d4e 100644
--- a/src/gallium/frontends/rusticl/meson.build
+++ b/src/gallium/frontends/rusticl/meson.build
@@ -89,10 +89,15 @@ rusticl_args = [
   '-Aclippy::redundant_field_names',
   '-Aclippy::too_many_arguments',
   '-Aclippy::type_complexity',
-  # Needs to be fixed
-  '-Aclippy::arc-with-non-send-sync',
 ]
 
+if rustc.version().version_compare('>=1.72')
+  rusticl_args += [
+    # Needs to be fixed
+    '-Aclippy::arc-with-non-send-sync'
+  ]
+endif
+
 rusticl_gen_args = [
   # can't do anything about it anyway
   '-Aclippy::all',

Reply via email to