3 ms·
> not so with regular Linux kernel. $ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git $ cd linux $ make LLVM=1 -j$(nproc) defconfi
by ndesaulniers 4y ago
> not so with regular Linux kernel.
$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
$ cd linux
$ make LLVM=1 -j$(nproc) defconfig all -s
$ echo $?
0
$
See also the official kernel docs which describe more which architectures can be expected to compile cleanly out of the box. There are something like 10^6000 possible kernel configurations though, so no promises (regardless of toolchain).
https://www.kernel.org/doc/html/latest/kbuild/llvm.html#supported-architectures https://www.kernel.org/doc/html/latest/kbuild/llvm.html#supp...
We support clang-11 and newer.
Linus Torvalds has been using clang to build the kernels he runs personally, for ~2 years now.
https://lore.kernel.org/lkml/CAHk-=wiN1ujyVTgyt1GuZiyWAPfpLwwg-FY1V-J56saMyiA1Lg@mail.gmail.com/ https://lore.kernel.org/lkml/CAHk-=wiN1ujyVTgyt1GuZiyWAPfpLw...
>> I build the kernel I actually _use_ with clang, and make sure it's
clean in sane configurations
Not sure what's going on these days in Android land, thankfully no longer a problem of mine.
- pjmlp 4y agoI stand corrected, and apparently the love for the NDK experience goes both ways.