mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
nak/meson: specify rust flags globally and allow some clippy lints
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27234>
This commit is contained in:
parent
6dc182b6b2
commit
7c9734b6dc
1 changed files with 15 additions and 6 deletions
|
|
@ -12,6 +12,19 @@ if rc.version().version_compare('< 1.73.0')
|
|||
error('NAK requires Rust 1.73.0')
|
||||
endif
|
||||
|
||||
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',
|
||||
'-Anon_snake_case',
|
||||
]
|
||||
|
||||
dep_syn = dependency('syn',
|
||||
version : '>= 2.0.15',
|
||||
fallback : ['syn', 'dep_syn'],
|
||||
|
|
@ -33,9 +46,7 @@ _libbitview_rs = static_library(
|
|||
files('bitview/lib.rs'),
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
rust_abi : 'rust',
|
||||
rust_args : [
|
||||
'-Anon_snake_case',
|
||||
],
|
||||
rust_args : nak_rust_args,
|
||||
)
|
||||
|
||||
libnak_deps = [
|
||||
|
|
@ -98,9 +109,7 @@ _libnak_rs = static_library(
|
|||
files('nak/lib.rs'),
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
rust_abi : 'c',
|
||||
rust_args : [
|
||||
'-Anon_snake_case',
|
||||
],
|
||||
rust_args : nak_rust_args,
|
||||
link_with: [_libbitview_rs, libnak_bindings_gen, _libnak_ir_proc_rs],
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue