0

I tried to build the Ubuntu(24.04) kernel using CLANG but had no luck. I also couldn't find any resources or guides on CLANG compilation. Initially, I used this guide: https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel to build the kernel but this uses GCC, and I'm having a hard time making it use CLANG. Is it not possible to build it using CLANG?

1
  • See here. Commented Feb 11, 2025 at 1:11

1 Answer 1

0

It's as simple as:

$ make LLVM=1 menuconfig    # Or other config target

and then

$ make LLVM=1

Or if you'd like to build it as debian package:

$ make LLVM=1 bindeb-pkg

You may have to install clang and lld though (and possibly other dependencies):

$ sudo apt install clang lld

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.