Skip to content

Commit 2117444

Browse files
o1oo11oogregkh
authored andcommitted
scripts: generate_rust_analyzer: Add ffi crate
commit 05a2b00 upstream. Commit d072acd ("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: d072acd ("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>
1 parent ca19f3f commit 2117444

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

scripts/generate_rust_analyzer.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@ def append_sysroot_crate(
9797
["core", "compiler_builtins"],
9898
)
9999

100+
append_crate(
101+
"ffi",
102+
srctree / "rust" / "ffi.rs",
103+
["core", "compiler_builtins"],
104+
)
105+
100106
def append_crate_with_generated(
101107
display_name,
102108
deps,
@@ -116,9 +122,9 @@ def append_crate_with_generated(
116122
"exclude_dirs": [],
117123
}
118124

119-
append_crate_with_generated("bindings", ["core"])
120-
append_crate_with_generated("uapi", ["core"])
121-
append_crate_with_generated("kernel", ["core", "macros", "build_error", "bindings", "uapi"])
125+
append_crate_with_generated("bindings", ["core", "ffi"])
126+
append_crate_with_generated("uapi", ["core", "ffi"])
127+
append_crate_with_generated("kernel", ["core", "macros", "build_error", "ffi", "bindings", "uapi"])
122128

123129
def is_root_crate(build_file, target):
124130
try:

0 commit comments

Comments
 (0)