Skip to content

Commit 0f1ee79

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 c1a485c commit 0f1ee79

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

scripts/generate_rust_analyzer.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ def append_sysroot_crate(
9090
["core", "compiler_builtins"],
9191
)
9292

93+
append_crate(
94+
"ffi",
95+
srctree / "rust" / "ffi.rs",
96+
["core", "compiler_builtins"],
97+
)
98+
9399
def append_crate_with_generated(
94100
display_name,
95101
deps,
@@ -109,9 +115,9 @@ def append_crate_with_generated(
109115
"exclude_dirs": [],
110116
}
111117

112-
append_crate_with_generated("bindings", ["core"])
113-
append_crate_with_generated("uapi", ["core"])
114-
append_crate_with_generated("kernel", ["core", "macros", "build_error", "bindings", "uapi"])
118+
append_crate_with_generated("bindings", ["core", "ffi"])
119+
append_crate_with_generated("uapi", ["core", "ffi"])
120+
append_crate_with_generated("kernel", ["core", "macros", "build_error", "ffi", "bindings", "uapi"])
115121

116122
def is_root_crate(build_file, target):
117123
try:

0 commit comments

Comments
 (0)