linux/Documentation/rust
Miguel Ojeda d49082faf6 rust: avoid assuming a particular bindgen build
`bindgen`'s logic to find `libclang` (via `clang-sys`) may change over
time, and depends on how it was built (e.g. Linux distributions may decide
to build it differently, and we are going to provide documentation on
installing it via distributions later in this series).

Therefore, clarify that `bindgen` may be built in several ways and
simplify the documentation by only mentioning the most prominent
environment variable (`LIBCLANG_PATH`) as an example on how to tweak the
search of the library at runtime (i.e. when `bindgen` is built as our
documentation explains). This also avoids duplicating the documentation,
like `bindgen` itself does (i.e. it refers to `clang-sys`).

Similarly, replace the test we had for this (which used the real program)
with a mocked one, to avoid depending on the particular build as well.

Tested-by: Benno Lossin <benno.lossin@proton.me>
Tested-by: Andreas Hindborg <a.hindborg@samsung.com>
Link: https://lore.kernel.org/r/20240709160615.998336-8-ojeda@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2024-07-10 10:28:52 +02:00
..
arch-support.rst RISC-V Patches for the 6.10 Merge Window, Part 1 2024-05-22 09:56:00 -07:00
coding-guidelines.rst rust: support srctree-relative links 2023-12-21 20:54:17 +01:00
general-information.rst docs: rust: no_std is used 2024-07-08 23:44:00 +02:00
index.rst docs: rust: Move testing to a separate page 2024-02-18 21:22:27 +01:00
quick-start.rst rust: avoid assuming a particular bindgen build 2024-07-10 10:28:52 +02:00
testing.rst kbuild: rust: remove now-unneeded rusttest custom sysroot handling 2024-07-08 22:39:39 +02:00