Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scripts: generate_rust_analyzer: remove sysroot assertion

With nixpkgs's rustc, rust-src component is not bundled
with the compiler by default and is instead provided from
a separate store path, so this assumption does not hold.

The assertion assumes these paths are in the same location
which causes `make LLVM=1 rust-analyzer` to fail on NixOS.

Link: https://rust-for-linux.zulipchat.com/#narrow/stream/x/topic/x/near/565284250
Signed-off-by: Onur Özkan <work@onurozkan.dev>
Reviewed-by: Gary Guo <gary@garyguo.net>
Fixes: fe992163575b ("rust: Support latest version of `rust-analyzer`")
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20251224135343.32476-1-work@onurozkan.dev
[ Reworded title. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>

authored by

Onur Özkan and committed by
Miguel Ojeda
1b83ef9f af20ae33

-3
-3
scripts/generate_rust_analyzer.py
··· 213 213 level=logging.INFO if args.verbose else logging.WARNING 214 214 ) 215 215 216 - # Making sure that the `sysroot` and `sysroot_src` belong to the same toolchain. 217 - assert args.sysroot in args.sysroot_src.parents 218 - 219 216 rust_project = { 220 217 "crates": generate_crates(args.srctree, args.objtree, args.sysroot_src, args.exttree, args.cfgs, args.core_edition), 221 218 "sysroot": str(args.sysroot),