Documentation/llvm: Improve formatting of commands, variables, and arguments
While reviewing a separate patch, I noticed that the formatting of the commands, variables, and arguments was not in a monospaced font like the rest of the Kbuild documentation (see kbuild/kconfig.rst for an example). This is due to a lack of "::" before indented command blocks and single backticks instead of double backticks for inline formatting. Add those so that the document looks nicer in an HTML format, while not ruining the look in plain text. As a result of this, we can remove the escaped backslashes in the last code block and move them to single backslashes. Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Change-Id: I1a0ed51c5acf44e76b96715c719cef5ad0f9570d
This commit is contained in:
parent
b3d8ffe52f
commit
be51689e5e
@ -23,8 +23,8 @@ supports C and the GNU C extensions required by the kernel, and is pronounced
|
|||||||
Clang
|
Clang
|
||||||
-----
|
-----
|
||||||
|
|
||||||
The compiler used can be swapped out via `CC=` command line argument to `make`.
|
The compiler used can be swapped out via ``CC=`` command line argument to ``make``.
|
||||||
`CC=` should be set when selecting a config and during a build.
|
``CC=`` should be set when selecting a config and during a build. ::
|
||||||
|
|
||||||
make CC=clang defconfig
|
make CC=clang defconfig
|
||||||
|
|
||||||
@ -34,33 +34,33 @@ Cross Compiling
|
|||||||
---------------
|
---------------
|
||||||
|
|
||||||
A single Clang compiler binary will typically contain all supported backends,
|
A single Clang compiler binary will typically contain all supported backends,
|
||||||
which can help simplify cross compiling.
|
which can help simplify cross compiling. ::
|
||||||
|
|
||||||
ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make CC=clang
|
ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make CC=clang
|
||||||
|
|
||||||
`CROSS_COMPILE` is not used to prefix the Clang compiler binary, instead
|
``CROSS_COMPILE`` is not used to prefix the Clang compiler binary, instead
|
||||||
`CROSS_COMPILE` is used to set a command line flag: `--target <triple>`. For
|
``CROSS_COMPILE`` is used to set a command line flag: ``--target <triple>``. For
|
||||||
example:
|
example: ::
|
||||||
|
|
||||||
clang --target aarch64-linux-gnu foo.c
|
clang --target aarch64-linux-gnu foo.c
|
||||||
|
|
||||||
LLVM Utilities
|
LLVM Utilities
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
LLVM has substitutes for GNU binutils utilities. Kbuild supports `LLVM=1`
|
LLVM has substitutes for GNU binutils utilities. Kbuild supports ``LLVM=1``
|
||||||
to enable them.
|
to enable them. ::
|
||||||
|
|
||||||
make LLVM=1
|
make LLVM=1
|
||||||
|
|
||||||
They can be enabled individually. The full list of the parameters:
|
They can be enabled individually. The full list of the parameters: ::
|
||||||
|
|
||||||
make CC=clang LD=ld.lld AR=llvm-ar NM=llvm-nm STRIP=llvm-strip \\
|
make CC=clang LD=ld.lld AR=llvm-ar NM=llvm-nm STRIP=llvm-strip \
|
||||||
OBJCOPY=llvm-objcopy OBJDUMP=llvm-objdump OBJSIZE=llvm-size \\
|
OBJCOPY=llvm-objcopy OBJDUMP=llvm-objdump OBJSIZE=llvm-size \
|
||||||
READELF=llvm-readelf HOSTCC=clang HOSTCXX=clang++ HOSTAR=llvm-ar \\
|
READELF=llvm-readelf HOSTCC=clang HOSTCXX=clang++ HOSTAR=llvm-ar \
|
||||||
HOSTLD=ld.lld
|
HOSTLD=ld.lld
|
||||||
|
|
||||||
Currently, the integrated assembler is disabled by default. You can pass
|
Currently, the integrated assembler is disabled by default. You can pass
|
||||||
`LLVM_IAS=1` to enable it.
|
``LLVM_IAS=1`` to enable it.
|
||||||
|
|
||||||
Getting Help
|
Getting Help
|
||||||
------------
|
------------
|
||||||
|
Loading…
Reference in New Issue
Block a user