mirror of
https://github.com/torvalds/linux.git
synced 2025-08-16 06:31:34 +02:00
scripts: generate_rust_analyzer: Add ffi crate
Commitd072acda48
("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:d072acda48
("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>
This commit is contained in:
parent
0af2f6be1b
commit
05a2b0011c
1 changed files with 9 additions and 3 deletions
|
@ -112,6 +112,12 @@ def generate_crates(srctree, objtree, sysroot_src, external_src, cfgs):
|
|||
cfg=["kernel"],
|
||||
)
|
||||
|
||||
append_crate(
|
||||
"ffi",
|
||||
srctree / "rust" / "ffi.rs",
|
||||
["core", "compiler_builtins"],
|
||||
)
|
||||
|
||||
def append_crate_with_generated(
|
||||
display_name,
|
||||
deps,
|
||||
|
@ -131,9 +137,9 @@ def generate_crates(srctree, objtree, sysroot_src, external_src, cfgs):
|
|||
"exclude_dirs": [],
|
||||
}
|
||||
|
||||
append_crate_with_generated("bindings", ["core"])
|
||||
append_crate_with_generated("uapi", ["core"])
|
||||
append_crate_with_generated("kernel", ["core", "macros", "build_error", "pin_init", "bindings", "uapi"])
|
||||
append_crate_with_generated("bindings", ["core", "ffi"])
|
||||
append_crate_with_generated("uapi", ["core", "ffi"])
|
||||
append_crate_with_generated("kernel", ["core", "macros", "build_error", "pin_init", "ffi", "bindings", "uapi"])
|
||||
|
||||
def is_root_crate(build_file, target):
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue