rusticl: check rustc version for flags requiring newer rustc/clippy
authorKarol Herbst <kherbst@redhat.com>
Wed, 20 Dec 2023 22:08:34 +0000 (23:08 +0100)
committerEric Engestrom <eric@engestrom.ch>
Fri, 22 Dec 2023 15:48:26 +0000 (15:48 +0000)
Fixes: 7e74ee07e3a ("rusticl: silence clippy::arc-with-non-send-sync for now")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26780>
(cherry picked from commit 9643671dae06701fa5ad926b6f30909407d1f8ac)

.pick_status.json
meson.build
src/gallium/frontends/rusticl/meson.build

index 6ea6ab5751d197a2c49ba1c9bc38f3f0ee783322..7b16caa72764526ca318b9a66ad36d792b86cdea 100644 (file)
         "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
index fbb0b29322df572dc38f278cb0f04ac53517d4e6..35cc5f1cd5fd9079737440c2388197cf3d441438 100644 (file)
@@ -796,6 +796,7 @@ if with_gallium_rusticl
   endif
 
   add_languages('rust', required: true)
+  rustc = meson.get_compiler('rust')
 
   with_clc = true
 endif
index 279bd8d4d5acb4f8e1219a1835cc847066b4692e..32a8bb85d4e077c00a245cff98dd47d9493dec91 100644 (file)
@@ -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',