Commit 908f2d1
backend/ninja: Generate sysroot in rust-project.json
Rust-analyzer relies on sysroot to discover its proc-macro server [1] which is
typically installed at <sysroot>/libexec/rust-analyzer-proc-macro-srv. When
used with rust-project.json, rust-analyzer expects the json file to specify
sysroot and fails to launch the proc-macro server otherwise.
So add sysroot to the meson-generated rust-project.json and point it to the
sysroot of the detected rustc compiler.
[1] https://github.com/rust-lang/rust-analyzer/blob/2024-09-16/crates/project-model/src/sysroot.rs#L175
Signed-off-by: Junjie Mao <[email protected]>
(cherry picked from commit e5d03f5)1 parent 72af62b commit 908f2d1
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
700 | 700 | | |
701 | 701 | | |
702 | 702 | | |
| 703 | + | |
703 | 704 | | |
704 | 705 | | |
705 | | - | |
706 | | - | |
| 706 | + | |
| 707 | + | |
707 | 708 | | |
708 | 709 | | |
709 | 710 | | |
| |||
0 commit comments