Linux 5.1 Will Play Nicer With The LLVM Linker (LD.LLD)
The Kbuild updates for the in-development Linux 5.1 kernel have a few worthwhile improvements including the ability to pass optional flags to dpkg-buildpackage when spinning up a Debian kernel package, some minor optimizations, and preparations around LD.LLD support in using the LLVM linker to link the Linux kernel.
Nick Desaulniers of Google, one of the engineers there who has been part of the renewed effort to build the Linux kernel with LLVM's Clang compiler, upstreamed a new patch to fix an issue that held back using the LLVM linker in some configurations.
In particular, when trying to specify ld.lld as the linker to use when building the kernel, if ld.lld isn't in the same directory as the rest of the compiler toolchain to be used, the kernel's build scripts would have issue in figuring out the GCC toolchain directory. That's now been cleared up to help those trying to use the LLVM linker with the Linux kernel.
Besides Google's interest in using Clang to build the Linux kernel, they've also been interested in the LLVM linker (and in fact divesting from GNU's Gold linker) due to the greater performance and LLD still being a drop-in replacement to the GNU linkers.
Those unfamiliar with LLD and wanting to learn more about it can do so at lld.llvm.org. All of the Kbuild updates for this kernel cycle are outlined in this pull request.
Nick Desaulniers of Google, one of the engineers there who has been part of the renewed effort to build the Linux kernel with LLVM's Clang compiler, upstreamed a new patch to fix an issue that held back using the LLVM linker in some configurations.
In particular, when trying to specify ld.lld as the linker to use when building the kernel, if ld.lld isn't in the same directory as the rest of the compiler toolchain to be used, the kernel's build scripts would have issue in figuring out the GCC toolchain directory. That's now been cleared up to help those trying to use the LLVM linker with the Linux kernel.
Besides Google's interest in using Clang to build the Linux kernel, they've also been interested in the LLVM linker (and in fact divesting from GNU's Gold linker) due to the greater performance and LLD still being a drop-in replacement to the GNU linkers.
Those unfamiliar with LLD and wanting to learn more about it can do so at lld.llvm.org. All of the Kbuild updates for this kernel cycle are outlined in this pull request.
4 Comments