Clang LTO Patches Updated For The Linux Kernel

Written by Michael Larabel in Linux Kernel on 4 September 2020 at 02:55 AM EDT. 3 Comments
LINUX KERNEL
Google engineers have posted a new revision of their work from earlier this summer for allowing the Linux kernel to be LTO-optimized using Clang.

Sami Tolvanen of Google sent out the second version of their patches for Clang LTO support with the Linux kernel. These patches allow making use of Clang's link-time optimizations for building Linux x86_64 and AArch64 (ARM64) Linux kernels.

Employing LTO for the Linux kernel has beneficial performance advantages as well as the possibility of smaller binaries and in the case of Clang can benefit from the Control-Flow Integrity support. In the patches Google notes they already ship "millions of Pixel devices" with the Linux kernel built using LTO+CFI since 2018.

The new patches for Clang LTO'ing the Linux kernel include various fixes and other improvements.

Given the heavy interest in compiler optimizations for the Linux kernel, hopefully these Clang LTO patches will manage to make it mainline sooner rather than later. When it happens, I'll surely be running some benchmarks on my end.
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