mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-11-23 10:14:13 +08:00
meson: centralize checking for new enough meson for rust support
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30414>
This commit is contained in:
parent
b3a9c91d9b
commit
f7f343796f
16
meson.build
16
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')
|
||||
|
@ -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',
|
||||
|
@ -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',
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user