Main Page

LLVMLinux Project Overview

This project aims to fully build the Linux kernel using Clang which is the C front end for the LLVM compiler infrastructure project. Together Clang and LLVM have many positive attributes and features which many developers and system integrators would like to take advantage of when developing and deploying the Linux Kernel as a part of their own projects.

The hope is that this project will help reduce duplicate work, as well as concentrate, and accelerate efforts around this subject matter in order to allow Linux Kernel developers, and system integrators to have the choice of a Clang compiled Linux kernel. The goal is for this project to be a testing/proving ground for these updates and to get patches that make this possible upstream to their respective projects.

The LLVMLinux project consolidates the work of the lll-project, the PAX team, and Mark Charlebois' work on the ARM kernel.

There have been several presentations and articles on this topic if you wish to learn more about the reasons for this project.

Currently the work is centred around the ARM, x86 and x86_64 architectures but contributions to support other architectures are welcome. Patches accepted!

Interested parties will be holding a Bi-weekly Google Hangout to discuss project status and goals. You can see the meeting schedule on the Calendar


Headline text

News

2014.04.07 Jan-Simon Möller will be giving a talk during EuroLLVM in Edinburgh. See the programme page.

2014.02.02 A patchset for the stable kernel will be available for kernel v3.13 soon.

2014.02.01 Jan-Simon will be giving talks during FOSDEM. Join us in the LLVM devroom !

2013.09.18 Behan and Mark will be leading the LLVM microConference at Linux Plumbers Conference.

2013.02.20 Behan Webster will be presenting a talk at Embedded Linux Conference: LLVMLinux: Compiling the Linux Kernel with LLVM slides Video


2013.02.18: Behan Webster will be presenting a talk at Android Builders Summit: LLVMLinux: Compiling Android with LLVM slides

2013.02.02: Jan-Simon Möller will be presenting a lightning talk at FOSDEM: The Linux Kernel with Dragon Wings

2012.08.16: Bryce Adelstein-Lelbach will be giving a talk on LLVM-compiled Linux for the Real World at LinuxCon NA

2012.08.16: An LLVM micro-conference has been added to this year's Linux Plumbers Conference. Mark Charlebois and Behan Webster will talking about LLVM Toolchain - Update and State of Building Linux with LLVM and Jan-Simon Moeller will be talking about LLVM/Clang x86 Kernel Build.

2012.08.13: A LLVM microconference has been setup for this year's Linux Plumbers Conference. Several project contributors will be giving talks during the microconference.

2012.07.14 Demo of a clang built kernel running on an i7 laptop!

2012.06.12: New targets! x86_64 and i586 are now available beside the ARM targets msm and vexpress.

Why use Clang/LLVM with the Linux Kernel?

  • Fast Compiles (making you able to work faster)
  • LLVM/Clang is a fast moving project with many things fixed quickly and features added.
  • LLVM is a family of tools used in many problem domains leading to one code base being able to build tools to work on just about anything you need: one place to add features, or fix bugs.
  • BSD License (some people prefer this license to the GPL)
  • Built in static analyzer
  • Great error reporting and Fix-it hints
  • LLVM technology can be embedded into many tools (even yours!)
  • Already in wide used in OSS projects and in industry

Project Status

Success
Success
Success
Success
Building

Project Roadmap/Todos

0
of
1
completed
0
of
1
completed
0
of
1
completed
0
of
1
completed
0
of
1
completed
0
of
1
completed

Project Bug Status

Current State of the LLVMLinux project

  • A build framework which downloads and builds LLVM, Clang, QEMU, and cross-compiles the linux kernel, and LTP
  • Work is currently centering around the ARM, i586 and x86_64 architectures (it would be great to see contributions to other architectures such as MIPS, PowerPC, etc)
  • The x86_64 patches from the lll-project have been rolled into the LLVMLinux code base. The targets for i586 and x86_64 allow you to build working kernels. However, not for production use yet.
  • An SD image has been constructed using Linaro upon which we add the latest Linux Test Project (LTP) for testing ARM targets in QEMU. In future we hope to extend this testing to other architectures as well.
  • Built kernel are booted using QEMU with the aforementioned SD image, which executes the LTP in an effort to see whether the kernel has been compiled properly with Clang/LLVM.
  • Buildbot boot-tests patched ARM kernels compiled with both Clang and gcc, as well as nightly LTP runs on both kernels.
  • The above process is executed by buildbot, which provides continuous integration for all the associated code bases, and posts build statuses to the #llvmlinux IRC channel on OFTC
  • Any issues which are found through these processes will be fixed, and patches submitted upstream to the kernel and LLVM/Clang projects.
  • A list of broken kernel options can be found here.

How Can I Get Involved?

Who Else is Using Clang/LLVM?

Project Hosting

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More about the foundation...