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',