meson: add rust_global_args for flags for all the rust compilations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
This commit is contained in:
@@ -820,6 +820,9 @@ if with_gallium_rusticl or with_nouveau_vk or with_tools.contains('etnaviv') or
|
||||
bindgen_output_args += ['--raw-line', '#![allow(unnecessary_transmutes)]']
|
||||
endif
|
||||
|
||||
rust_global_args = [
|
||||
]
|
||||
|
||||
rust_2024_lint_args = [
|
||||
'-Dboxed_slice_into_iter',
|
||||
'-Ddeprecated_safe_2024',
|
||||
|
||||
@@ -39,6 +39,7 @@ _compiler_binding_types = [
|
||||
]
|
||||
|
||||
_compiler_rust_args = [
|
||||
rust_global_args,
|
||||
rust_2024_lint_args,
|
||||
'-Aclippy::identity_op',
|
||||
'-Aclippy::len_zero',
|
||||
@@ -159,6 +160,7 @@ _libcompiler_proc_rs = static_library(
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
dependencies : [dep_syn],
|
||||
rust_abi : 'rust',
|
||||
rust_args : rust_global_args,
|
||||
native : true,
|
||||
)
|
||||
|
||||
|
||||
@@ -153,6 +153,7 @@ if with_tools.contains('etnaviv')
|
||||
'etnaviv_isa_proc',
|
||||
files('isa_proc.rs', 'isa.rs'),
|
||||
dependencies : [dep_indexmap, dep_roxmltree, dep_syn, dep_pest_generator],
|
||||
rust_args : rust_global_args,
|
||||
)
|
||||
|
||||
if with_tests
|
||||
@@ -165,6 +166,7 @@ if with_tools.contains('etnaviv')
|
||||
files('lib.rs'),
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
rust_abi : 'c',
|
||||
rust_args : rust_global_args,
|
||||
dependencies: [dep_indexmap, dep_roxmltree, dep_pest],
|
||||
link_with: [_libetnaviv_isa_bindings_gen, _libetnaviv_isa_proc_rs],
|
||||
)
|
||||
|
||||
@@ -64,6 +64,7 @@ rusticl_files = files(
|
||||
)
|
||||
|
||||
rusticl_args = [
|
||||
rust_global_args,
|
||||
rust_2024_lint_args,
|
||||
|
||||
# Should be ran manually before moving to the 2024 edition
|
||||
@@ -451,6 +452,7 @@ if meson.version().version_compare('>= 1.9.0') and with_tests
|
||||
'rusticl_test',
|
||||
'test/lib.rs',
|
||||
rust_abi : 'c',
|
||||
rust_args : rust_global_args,
|
||||
)
|
||||
|
||||
rust.test('rusticl_opencl_gen_test', rusticl_opencl_gen, suite : ['rusticl'])
|
||||
|
||||
@@ -56,4 +56,5 @@ libnak_latencies_rs = static_library(
|
||||
_nak_latencies_lib_rs,
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
rust_abi : 'rust',
|
||||
rust_args : rust_global_args,
|
||||
)
|
||||
|
||||
@@ -96,6 +96,7 @@ _libnak_ir_proc_rs = rust.proc_macro(
|
||||
'nak_ir_proc',
|
||||
files('nak/ir_proc.rs'),
|
||||
dependencies : [idep_compiler_proc_rs],
|
||||
rust_args : rust_global_args,
|
||||
)
|
||||
|
||||
_libnak_rs = static_library(
|
||||
|
||||
@@ -229,6 +229,7 @@ if with_nouveau_vk
|
||||
files('nv_push_rs/lib.rs'),
|
||||
gnu_symbol_visibility: 'hidden',
|
||||
rust_abi: 'rust',
|
||||
rust_args : rust_global_args,
|
||||
dependencies: [idep_nvidia_headers_rs],
|
||||
)
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
nouveau_rust_args = [
|
||||
rust_global_args,
|
||||
rust_2024_lint_args,
|
||||
'-Aclippy::identity_op',
|
||||
'-Aclippy::len_zero',
|
||||
|
||||
@@ -45,5 +45,6 @@ libmesa_rust_util = static_library(
|
||||
'lib.rs',
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
rust_abi : 'rust',
|
||||
rust_args : rust_global_args,
|
||||
dependencies: dep_mesa3d_util,
|
||||
)
|
||||
|
||||
@@ -6,6 +6,7 @@ libmesa_protocols = static_library(
|
||||
'lib.rs',
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
rust_abi : 'rust',
|
||||
rust_args : rust_global_args,
|
||||
link_with: [libmesa_rust_util],
|
||||
dependencies: dep_mesa3d_util
|
||||
)
|
||||
|
||||
@@ -6,6 +6,7 @@ libvirtgpu_kumquat = static_library(
|
||||
'lib.rs',
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
rust_abi : 'rust',
|
||||
rust_args : rust_global_args,
|
||||
link_with: [libmesa_protocols, libmesa_rust_util],
|
||||
dependencies: [dep_mesa3d_util]
|
||||
)
|
||||
|
||||
@@ -20,6 +20,7 @@ libvirtgpu_kumquat_ffi = static_library(
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
rust_abi : 'c',
|
||||
rust_args : [
|
||||
rust_global_args,
|
||||
virtgpu_kumquat_ffi_args,
|
||||
],
|
||||
link_with: [libmesa_protocols, libmesa_rust_util, libvirtgpu_kumquat],
|
||||
|
||||
Reference in New Issue
Block a user