Compiling The Linux Kernel With LLVM's Clang Matured In 2022

Written by Michael Larabel in LLVM on 5 January 2023 at 07:00 PM EST. 19 Comments
LLVM
Over the past few years it's become possible to compile the mainline Linux kernel with LLVM/Clang compared to the long-standing dependence on using the GCC compiler. While it's been possible for 3+ years to use the mainline Linux kernel and mainline Clang for building a working x86_64 and AArch64 kernel, the process and support continues to mature.

Nathan Chancellor who maintains the "ClangBuiltLinux" effort thanks to funding from The Linux Foundation and Google has written a 2022 summary of the accomplishments made over the past year.

Nathan Chancellor's work on the "ClangBuiltLinux" effort in 2022 included addressing many compiler warnings within the kernel, Control Flow Integrity (CFI) related changes, making the LLVM environment variable handling more flexible, tooling improvements, and other work. Plus a lot of testing for making sure that nothing breaks with the latest mainline Linux kernel Git code as well as the latest LLVM/Clang compiler code and that ensuring the appropriate flags are being maintained, etc.


Those interested in learning more about the strides made over the past year on compiling the Linux kernel with Clang can learn more via nathanchance.dev. More generally, the latest build status and other project information for the ClangBuiltLinux project can be found on GitHub.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week