diff --git a/meson.build b/meson.build index 2bf55abe0cf..99a771c737d 100644 --- a/meson.build +++ b/meson.build @@ -841,13 +841,21 @@ if with_gallium_rusticl if not with_gallium error('rusticl requires at least one gallium driver.') endif - - if meson.version().version_compare('< 1.4.0') - error('rusticl requires meson 1.4.0 or newer') - endif endif if with_gallium_rusticl or with_nouveau_vk or with_tools.contains('etnaviv') + if with_gallium_rusticl + # uses rust.bindgen.output_inline_wrapper needing 1.4.0 + if meson.version().version_compare('< 1.4.0') + error('Rusticl requires meson 1.4.0 or newer') + endif + else + # see https://github.com/mesonbuild/meson/issues/12758 (backported to 1.3.2) + if meson.version().version_compare('< 1.3.2') + error('Mesa Rust support requires meson 1.3.2 or newer') + endif + endif + add_languages('rust', required: true) rustc = meson.get_compiler('rust') rust = import('rust') diff --git a/src/etnaviv/isa/meson.build b/src/etnaviv/isa/meson.build index 86bb62ea4eb..657465a8d9f 100644 --- a/src/etnaviv/isa/meson.build +++ b/src/etnaviv/isa/meson.build @@ -91,10 +91,6 @@ disasm = executable( ) if with_tools.contains('etnaviv') - if meson.version().version_compare('< 1.4.0') - error('etnaviv requires meson 1.4.0 or newer') - endif - isa_bindings_rs = rust.bindgen( input : 'bindings.h', output : 'isa_bindings.rs', diff --git a/src/nouveau/compiler/meson.build b/src/nouveau/compiler/meson.build index 871e786e6b4..3dcd8bb591f 100644 --- a/src/nouveau/compiler/meson.build +++ b/src/nouveau/compiler/meson.build @@ -1,9 +1,5 @@ # Copyright © 2022 Collabora, Ltd. # SPDX-License-Identifier: MIT -if meson.version().version_compare('< 1.3.0') - error('NVK requires meson 1.3.0 or newer') -endif - nak_rust_args = [ '-Aclippy::identity_op', '-Aclippy::len_zero', diff --git a/src/nouveau/nil/meson.build b/src/nouveau/nil/meson.build index 72b2fcfe3a1..d1ca650b486 100644 --- a/src/nouveau/nil/meson.build +++ b/src/nouveau/nil/meson.build @@ -1,9 +1,5 @@ # Copyright © 2022 Collabora Ltd # SPDX-License-Identifier: MIT -if meson.version().version_compare('< 1.3.0') - error('NVK requires meson 1.3.0 or newer') -endif - prog_cbindgen = find_program( 'cbindgen', required : true,