Module: Mesa
Branch: main
Commit: 9643671dae06701fa5ad926b6f30909407d1f8ac
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=9643671dae06701fa5ad926b6f30909407d1f8ac

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>

---

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

diff --git a/meson.build b/meson.build
index 8d103003f77..309e7efb8e7 100644
--- a/meson.build
+++ b/meson.build
@@ -818,6 +818,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 9e7b7d0af5b..4c83ce6ddda 100644
--- a/src/gallium/frontends/rusticl/meson.build
+++ b/src/gallium/frontends/rusticl/meson.build
@@ -90,10 +90,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
+
 if with_platform_x11
   rusticl_args += [
     '--cfg', 'glx',

Reply via email to