mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-28 14:00:30 +01:00
nouveau: Move bitview to a common rust util folder
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34975>
This commit is contained in:
parent
5fbcdd6e32
commit
0b06feee92
5 changed files with 35 additions and 44 deletions
|
|
@ -1,20 +1,5 @@
|
|||
# Copyright © 2022 Collabora, Ltd.
|
||||
# SPDX-License-Identifier: MIT
|
||||
nak_rust_args = [
|
||||
'-Aclippy::identity_op',
|
||||
'-Aclippy::len_zero',
|
||||
'-Aclippy::manual_range_contains',
|
||||
# normally this is a good one, but we use it where the "better" code is worse
|
||||
'-Aclippy::needless_range_loop',
|
||||
'-Aclippy::redundant_field_names',
|
||||
'-Aclippy::upper_case_acronyms',
|
||||
'-Aclippy::vec_box',
|
||||
'-Aclippy::write_with_newline',
|
||||
# warns about public function might dereference a raw pointer, but nothing is
|
||||
# actually public here
|
||||
'-Aclippy::not_unsafe_ptr_arg_deref',
|
||||
'-Anon_snake_case',
|
||||
]
|
||||
|
||||
dep_paste = dependency('paste',
|
||||
version : '>= 1.0.14',
|
||||
|
|
@ -47,25 +32,13 @@ _libacorn_rs = static_library(
|
|||
files('acorn/lib.rs'),
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
rust_abi : 'rust',
|
||||
rust_args : nak_rust_args,
|
||||
rust_args : nouveau_rust_args,
|
||||
)
|
||||
|
||||
idep_acorn_rs = declare_dependency(
|
||||
link_with : _libacorn_rs,
|
||||
)
|
||||
|
||||
_libbitview_rs = static_library(
|
||||
'bitview',
|
||||
files('bitview/lib.rs'),
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
rust_abi : 'rust',
|
||||
rust_args : nak_rust_args,
|
||||
)
|
||||
|
||||
idep_bitview_rs = declare_dependency(
|
||||
link_with : _libbitview_rs,
|
||||
)
|
||||
|
||||
libnak_deps = [
|
||||
idep_mesautil,
|
||||
idep_nir_headers,
|
||||
|
|
@ -121,18 +94,18 @@ _libnak_rs = static_library(
|
|||
gnu_symbol_visibility : 'hidden',
|
||||
rust_abi : 'c',
|
||||
rust_args : [
|
||||
nak_rust_args,
|
||||
nouveau_rust_args,
|
||||
# Otherwise, rustc trips up on -pthread
|
||||
'-Clink-arg=-Wno-unused-command-line-argument',
|
||||
],
|
||||
dependencies : [
|
||||
dep_paste,
|
||||
dep_rustc_hash,
|
||||
idep_bitview_rs,
|
||||
idep_compiler_rs,
|
||||
idep_nvidia_headers_rs,
|
||||
],
|
||||
link_with : [
|
||||
_libbitview_rs,
|
||||
_libnak_bindings_rs,
|
||||
_libnak_ir_proc_rs,
|
||||
],
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ subdir('drm')
|
|||
subdir('headers')
|
||||
subdir('winsys')
|
||||
if with_nouveau_vk
|
||||
subdir('rust')
|
||||
subdir('compiler')
|
||||
endif
|
||||
if with_tools.contains('drm-shim')
|
||||
|
|
|
|||
|
|
@ -38,19 +38,6 @@ _libnil_deps = [
|
|||
idep_nvidia_headers_rs,
|
||||
]
|
||||
|
||||
_libnil_rust_args = [
|
||||
'-Aclippy::identity_op',
|
||||
'-Aclippy::len_zero',
|
||||
'-Aclippy::manual_range_contains',
|
||||
# normally this is a good one, but we use it where the "better" code is worse
|
||||
'-Aclippy::needless_range_loop',
|
||||
'-Aclippy::redundant_field_names',
|
||||
'-Aclippy::upper_case_acronyms',
|
||||
'-Aclippy::vec_box',
|
||||
'-Aclippy::write_with_newline',
|
||||
'-Anon_snake_case',
|
||||
]
|
||||
|
||||
_nil_bindings_rs = rust.bindgen(
|
||||
input: ['nil_bindings.h', _nil_format_table],
|
||||
output: 'nil_bindings.rs',
|
||||
|
|
@ -92,7 +79,7 @@ _libnil = static_library(
|
|||
files('lib.rs'),
|
||||
gnu_symbol_visibility: 'hidden',
|
||||
rust_abi: 'c',
|
||||
rust_args: _libnil_rust_args,
|
||||
rust_args: nouveau_rust_args,
|
||||
link_with: [_libnil_format_table, _libnil_rs_bindings],
|
||||
dependencies: _libnil_deps,
|
||||
)
|
||||
|
|
|
|||
30
src/nouveau/rust/meson.build
Normal file
30
src/nouveau/rust/meson.build
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
# Copyright © 2025 Collabora, Ltd.
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
nouveau_rust_args = [
|
||||
'-Aclippy::identity_op',
|
||||
'-Aclippy::len_zero',
|
||||
'-Aclippy::manual_range_contains',
|
||||
# normally this is a good one, but we use it where the "better" code is worse
|
||||
'-Aclippy::needless_range_loop',
|
||||
'-Aclippy::redundant_field_names',
|
||||
'-Aclippy::upper_case_acronyms',
|
||||
'-Aclippy::vec_box',
|
||||
'-Aclippy::write_with_newline',
|
||||
# warns about public function might dereference a raw pointer, but nothing is
|
||||
# actually public here
|
||||
'-Aclippy::not_unsafe_ptr_arg_deref',
|
||||
'-Anon_snake_case',
|
||||
]
|
||||
|
||||
_libbitview_rs = static_library(
|
||||
'bitview',
|
||||
files('bitview/lib.rs'),
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
rust_abi : 'rust',
|
||||
rust_args : nouveau_rust_args,
|
||||
)
|
||||
|
||||
idep_bitview_rs = declare_dependency(
|
||||
link_with : _libbitview_rs,
|
||||
)
|
||||
Loading…
Add table
Reference in a new issue