On Sun, Jan 26, 2025 at 7:30 PM Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote: > > That seems to be a reasonable assumption. I guess some crazy setup > *could* install a bindgen that uses a different llvm version than > rustc itself, but that sounds pretty damn broken. Tangential to the issue, but a note on this: we have a few warnings in that `rust_is_available.sh` script for things that "do not look great", such as bindgen's libclang != Clang when `CC` is Clang, and we could have a warning for the case you mention, i.e. bindgen's libclang != rustc's LLVM. However, currently some kernel developers use toolchains from upstream Rust (e.g. from `rustup`) instead of their distributions, so that could be annoying for them (since their bindgen may be picking libclang from their distribution). But eventually when things stabilize more it could make sense, if most developers stop using those, as a by-default warning. Cheers, Miguel