Compiler – Fun with CLANG – Kernel, NVIDIA, and VMware… — 1 Comment

  1. Yeah, RG, talking about fun 🙂 I did the same about a week ago but with the 5.12 development rc’s! Just some thoughts about 5.12 compilation: if you use make CC=clang HOSTCC=clang LLVM=1 LLVM_IAS=1 -j8 you will be able to use LTO as well… But you have to do this in every step i.e: make CC=clang HOSTCC=clang LLVM=1 LLVM_IAS=1 oldconfig (etc.). After the new .config is generated you’ll find some LTO entries in it… As I am using Ubuntu the nvidia drivers are built using ‘dkms’. I changed the LD part of dkms.conf to LD=/path/to/ld.lld and it worked compiling with clang! Also you could try using the environment variable IGNORE_CC_MISMATCH=1 which eliminates the CC mismatch warning (this is also from the dkms.conf).

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.