compiler/rust: Add Rust 2024 lints

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36849>
This commit is contained in:
Faith Ekstrand 2025-08-19 10:54:58 -04:00 committed by Marge Bot
parent 3d4b29a0f6
commit 8324a14875

View file

@ -35,6 +35,10 @@ _compiler_binding_types = [
'u_printf_info',
]
_compiler_rust_args = [
rust_2024_lint_args,
]
_compiler_bindgen_args = [
bindgen_output_args,
'--allowlist-var', 'NIR_.*',
@ -100,6 +104,7 @@ _libcompiler_rs = static_library(
gnu_symbol_visibility : 'hidden',
rust_abi : 'rust',
dependencies: [_idep_libcompiler_c],
rust_args: _compiler_rust_args,
)
# TODO: Linking Rust executables (such as unit tests) doesn't play nicely
@ -115,7 +120,10 @@ if with_tests and get_option('b_sanitize') == 'none'
],
# This is needed to ensure we link against glibc
# See also https://gitlab.freedesktop.org/mesa/mesa/-/issues/11632
rust_args: ['-C', 'default-linker-libraries'],
rust_args: [
_compiler_rust_args,
'-C', 'default-linker-libraries',
],
)
endif