OpenMandriva Is Finding Great Success In Their Switch To Using LLVM's Clang Compiler
OpenMandriva remains among the few Linux distributions using the LLVM Clang compiler by default where possible in place of the GCC compiler. While at times it's difficult in maintaining this combination, they continue to find great success in using Clang as their default compiler.
OpenMandriva developer Bernhard Rosenkränzer presented at this month's EuroLLVM conference on their use of LLVM Clang by default where nearly all Linux distributions remain with the GNU Compiler Collection.
Their most prominent reasons for using Clang over GCC are for better compile times, a smoother cross-compilation experience, benefiting from the sanitizers and other tooling built around LLVM/Clang, and more readable code is (arguably) generated. OpenMandriva developers have also found less breakage with using LLVM/Clang even when using snapshots of the latest compiler state, which they tend to shift over to early in their development cycles knowing the six-month release cadence of LLVM.
But the pain points shared during EuroLLVM 2019 were LLVM/Clang still missing RISC-V architecture support so there they are relying upon GCC. They also encounter issues with many projects not testing against anything but GCC and some projects even being hostile towards building with Clang. There is also the possibility of missed optimizations when there are pre-processor macros going strictly for the GNU route.
Of more than twenty-thousand OpenMandriva packages, just around 139 currently have Clang-related patches while 327 have to rely upon GCC.
Those interested in learning more about OpenMandriva's usage of LLVM/Clang as the default system compiler can do so via this PDF slide deck from EuroLLVM while we await this year's video recordings.
OpenMandriva developer Bernhard Rosenkränzer presented at this month's EuroLLVM conference on their use of LLVM Clang by default where nearly all Linux distributions remain with the GNU Compiler Collection.
Their most prominent reasons for using Clang over GCC are for better compile times, a smoother cross-compilation experience, benefiting from the sanitizers and other tooling built around LLVM/Clang, and more readable code is (arguably) generated. OpenMandriva developers have also found less breakage with using LLVM/Clang even when using snapshots of the latest compiler state, which they tend to shift over to early in their development cycles knowing the six-month release cadence of LLVM.
But the pain points shared during EuroLLVM 2019 were LLVM/Clang still missing RISC-V architecture support so there they are relying upon GCC. They also encounter issues with many projects not testing against anything but GCC and some projects even being hostile towards building with Clang. There is also the possibility of missed optimizations when there are pre-processor macros going strictly for the GNU route.
Of more than twenty-thousand OpenMandriva packages, just around 139 currently have Clang-related patches while 327 have to rely upon GCC.
Those interested in learning more about OpenMandriva's usage of LLVM/Clang as the default system compiler can do so via this PDF slide deck from EuroLLVM while we await this year's video recordings.
55 Comments