Lines Matching +full:clang +full:- +full:format
1 .. SPDX-License-Identifier: GPL-2.0
10 ----------------------
15 under names like ``rustc``, ``rust-src``, ``rust-bindgen``, etc. However,
39 rustup override set $(scripts/min-tool-version.sh rustc)
45 https://forge.rust-lang.org/infra/other-installation-methods.html#standalone
52 cross-compile ``core`` and ``alloc``.
56 rustup component add rust-src
59 version later on requires re-adding the component.
64 curl -L "https://static.rust-lang.org/dist/rust-src-$(scripts/min-tool-version.sh rustc).tar.gz" |
65 tar -xzf - -C "$(rustc --print sysroot)/lib" \
66 "rust-src-$(scripts/min-tool-version.sh rustc)/rust-src/lib/" \
67 --strip-components=3
70 updating the source tree (this can be done by removing ``$(rustc --print
79 is compiled with ``CC=clang`` or ``LLVM=1``.
90 https://llvm.org/docs/GettingStarted.html#getting-the-source-code-and-building-llvm
93 to fetch pre-built releases and distribution packages.
104 cargo install --locked --version $(scripts/min-tool-version.sh bindgen) bindgen-cli
109 ``clang-sys`` (the Rust bindings crate that ``bindgen`` uses to access
112 * ``LLVM_CONFIG_PATH`` can be pointed to an ``llvm-config`` executable.
117 * Or ``CLANG_PATH`` can be pointed to a ``clang`` executable.
119 For details, please see ``clang-sys``'s documentation at:
121 https://github.com/KyleMayes/clang-sys#environment-variables
125 ------------------------
134 The ``rustfmt`` tool is used to automatically format all the Rust kernel code,
136 coding-guidelines.rst).
152 general-information.rst).
182 general-information.rst).
194 rust-analyzer
197 The `rust-analyzer <https://rust-analyzer.github.io/>`_ language server can
201 ``rust-analyzer`` needs a configuration file, ``rust-project.json``, which
202 can be generated by the ``rust-analyzer`` Make target::
204 make LLVM=1 rust-analyzer
208 -------------
218 -> Sample kernel code
219 -> Rust samples
221 And enable some sample modules either as built-in or as loadable.
225 --------
234 make CC=clang
241 -------
251 - Install a newer release (GDB >= 10.2, Binutils >= 2.36).
253 - Some versions of GDB (e.g. vanilla GDB 10.1) are able to use
254 the pre-demangled names embedded in the debug info (``CONFIG_DEBUG_INFO``).