Skip to content

Commit ed4e9e6

Browse files
nathanchancemasahir0y
authored andcommitted
Documentation/llvm: Add a section about supported architectures
The most common question around building the Linux kernel with clang is "does it work?" and the answer has always been "it depends on your architecture, configuration, and LLVM version" with no hard answers for users wanting to experiment. LLVM support has significantly improved over the past couple of years, resulting in more architectures and configurations supported, and continuous integration has made it easier to see what works and what does not. Add a section that goes over what architectures are supported in the current kernel version, how they should be built (with just clang or the LLVM utilities as well), and the level of support they receive. This will make it easier for people to try out building their kernel with LLVM and reporting issues that come about from it. Suggested-by: Miguel Ojeda <[email protected]> Signed-off-by: Nathan Chancellor <[email protected]> Reviewed-by: Nick Desaulniers <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
1 parent ae9162e commit ed4e9e6

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

Documentation/kbuild/llvm.rst

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,50 @@ They can be enabled individually. The full list of the parameters: ::
6363
Currently, the integrated assembler is disabled by default. You can pass
6464
``LLVM_IAS=1`` to enable it.
6565

66+
Supported Architectures
67+
-----------------------
68+
69+
LLVM does not target all of the architectures that Linux supports and
70+
just because a target is supported in LLVM does not mean that the kernel
71+
will build or work without any issues. Below is a general summary of
72+
architectures that currently work with ``CC=clang`` or ``LLVM=1``. Level
73+
of support corresponds to "S" values in the MAINTAINERS files. If an
74+
architecture is not present, it either means that LLVM does not target
75+
it or there are known issues. Using the latest stable version of LLVM or
76+
even the development tree will generally yield the best results.
77+
An architecture's ``defconfig`` is generally expected to work well,
78+
certain configurations may have problems that have not been uncovered
79+
yet. Bug reports are always welcome at the issue tracker below!
80+
81+
.. list-table::
82+
:widths: 10 10 10
83+
:header-rows: 1
84+
85+
* - Architecture
86+
- Level of support
87+
- ``make`` command
88+
* - arm
89+
- Supported
90+
- ``LLVM=1``
91+
* - arm64
92+
- Supported
93+
- ``LLVM=1``
94+
* - mips
95+
- Maintained
96+
- ``CC=clang``
97+
* - powerpc
98+
- Maintained
99+
- ``CC=clang``
100+
* - riscv
101+
- Maintained
102+
- ``CC=clang``
103+
* - s390
104+
- Maintained
105+
- ``CC=clang``
106+
* - x86
107+
- Supported
108+
- ``LLVM=1``
109+
66110
Getting Help
67111
------------
68112

0 commit comments

Comments
 (0)