lkml.org 
[lkml]   [2023]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] scripts: `make rust-analyzer` for out-of-tree modules
On Fri, Jan 20, 2023 at 2:17 PM Björn Roy Baron
<bjorn3_gh@protonmail.com> wrote:
>
> I tested this with https://github.com/Rust-for-Linux/rust-out-of-tree-module using "make -C ../rust-for-linux M=$(pwd) rust-analyzer". It produces a rust-project.json file, however it misses the actual rust_out_of_tree crate. This is due to the fact that generate_rust_analyzer.py only checks Makefile to find the crate roots, but rust-out-of-tree-module defines it in Kbuild instead.

Thanks for testing it! Indeed, we should support out-of-tree modules
using the `Kbuild` + `Makefile` approach.

Having said that, I wonder if we should even attempt to perform the
search for out-of-tree modules. The search loop is a simple hack which
works fine for in-tree code because we know the structure of the code
around us, but we cannot for out-of-tree modules. For instance, they
may be using a different build system, or not mentioning the object
file, etc.

Perhaps we should simply ask them to give us the roots directly as a
list of arguments to the script or similar.

Cheers,
Miguel

\
 
 \ /
  Last update: 2023-03-26 23:49    [W:0.137 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site