rusticl: don't set size_t-is-usize for >=bindgen-0.65
authorKarol Herbst <kherbst@redhat.com>
Thu, 13 Apr 2023 19:14:33 +0000 (21:14 +0200)
committerMarge Bot <emma+marge@anholt.net>
Mon, 24 Apr 2023 12:59:41 +0000 (12:59 +0000)
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8827
Fixes: 20c90fed5a0 ("rusticl: added")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22484>

src/gallium/frontends/rusticl/meson.build

index 82a2fd5..5c587f7 100644 (file)
@@ -93,7 +93,6 @@ rusticl_gen_args = [
 rusticl_bindgen_args = [
   '--no-convert-floats',
   '--use-array-pointers-in-arguments',
-  '--size_t-is-usize',
   '--default-enum-style', 'rust',
   '--with-derive-partialeq',
   '--with-derive-eq',
@@ -104,6 +103,12 @@ rusticl_bindgen_args = [
   '--anon-fields-prefix', 'anon_',
 ]
 
+if find_program('bindgen').version().version_compare('< 0.65')
+  rusticl_bindgen_args += [
+    '--size_t-is-usize',
+  ]
+endif
+
 rusticl_bindgen_c_args = [
   '-fno-builtin-malloc',
 ]