From: Karol Herbst Date: Wed, 20 Dec 2023 22:08:34 +0000 (+0100) Subject: rusticl: check rustc version for flags requiring newer rustc/clippy X-Git-Tag: upstream/23.3.3~58 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=676fd7a287a0509a2903f748bca631f05894fd00;p=platform%2Fupstream%2Fmesa.git 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 Part-of: (cherry picked from commit 9643671dae06701fa5ad926b6f30909407d1f8ac) --- 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',