scripts: generate_rust_analyzer: Add ffi crate
commit 05a2b0011c4b6cbbc9b577f6abebe4e9333b0cf6 upstream.
Commit d072acda4862 ("rust: use custom FFI integer types") did not
update rust-analyzer to include the new crate.
To enable rust-analyzer support for these custom ffi types, add the
`ffi` crate as a dependency to the `bindings`, `uapi` and `kernel`
crates, which all directly depend on it.
Fixes: d072acda4862 ("rust: use custom FFI integer types")
Signed-off-by: Lukas Fischer <kernel@o1oo11oo.de>
Reviewed-by: Tamir Duberstein <tamird@gmail.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250404125150.85783-2-kernel@o1oo11oo.de
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
c1a485c46c
commit
0f1ee79b0f
@@ -90,6 +90,12 @@ def generate_crates(srctree, objtree, sysroot_src, external_src, cfgs):
|
|||||||
["core", "compiler_builtins"],
|
["core", "compiler_builtins"],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
append_crate(
|
||||||
|
"ffi",
|
||||||
|
srctree / "rust" / "ffi.rs",
|
||||||
|
["core", "compiler_builtins"],
|
||||||
|
)
|
||||||
|
|
||||||
def append_crate_with_generated(
|
def append_crate_with_generated(
|
||||||
display_name,
|
display_name,
|
||||||
deps,
|
deps,
|
||||||
@@ -109,9 +115,9 @@ def generate_crates(srctree, objtree, sysroot_src, external_src, cfgs):
|
|||||||
"exclude_dirs": [],
|
"exclude_dirs": [],
|
||||||
}
|
}
|
||||||
|
|
||||||
append_crate_with_generated("bindings", ["core"])
|
append_crate_with_generated("bindings", ["core", "ffi"])
|
||||||
append_crate_with_generated("uapi", ["core"])
|
append_crate_with_generated("uapi", ["core", "ffi"])
|
||||||
append_crate_with_generated("kernel", ["core", "macros", "build_error", "bindings", "uapi"])
|
append_crate_with_generated("kernel", ["core", "macros", "build_error", "ffi", "bindings", "uapi"])
|
||||||
|
|
||||||
def is_root_crate(build_file, target):
|
def is_root_crate(build_file, target):
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user