Linux Foundation Wiki

project collaboration site

User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

llvmlinux [2017/10/06 01:27]
emsearcy created
llvmlinux [2017/12/04 22:06] (current)
emsearcy Copy relevant non-broken sections from wiki
Line 1: Line 1:
 ====== LLVMLinux ====== ====== LLVMLinux ======
 +:!: //This project is not currently active. This information is kept available of archive purposes.//
 +The LLVMLinux project aims to fully build the [[http://​|Linux kernel]] using LLVM/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 LLVMLinux project consolidates work from the lll-project,​ the PAX team, and Mark Charlebois'​ work on the ARM kernel.
 +===== Show me the code! ======
 +By popular demand, here are the coles-notes version of how to build a kernel with clang.
 +  - Get the latest SVN version of clang (v3.5 or higher: You need named register support which isn't in v3.4)
 +    * For Debian/​Ubuntu users: [[http://​​apt/​|Nightly clang packages]]
 +    * For everyone else: [[http://​​get_started.html|Building clang from source]]
 +  - You can use the LLVMLinux kernel tree (recent mainline with latest LLVMLinux patches applied)
 +    * %%git clone git://​​llvmlinux/​kernel.git%%
 +  - Build your kernel, making sure to set HOSTCC/CC and optionally ARCH/​CROSS_COMPILE.
 +    * For native compiling (like for x86_64): make HOSTCC=clang CC=clang
 +    * For cross: make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- HOSTCC=clang CC=clang ​
 +    * For cross: make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- HOSTCC=clang CC=clang
 +    * You may find you need to set GCC_TOOLCHAIN=<​path-to-your-gcc-cross-toolchain>​ if the above doesn'​t work.
 +Yes, there is still a dependancy on parts of the gcc toolchain. Most notably ld, as, and sometimes libgcc.
 +===== News =====
 +2014.04.07 Jan-Simon Möller will be giving a talk during EuroLLVM in Edinburgh. See the [[http://​​devmtg/​2014-04/#​callfor|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 [[http://​​events/​embedded-linux-conference|Embedded Linux Conference]]:​ [[http://​​event/​a608109d374ac283e395f6028e5d868c?​iframe=yes&​w=900&​sidebar=yes&​bg=no#?​iframe=yes&​w=900&​sidebar=yes&​bg=no|LLVMLinux:​ Compiling the Linux Kernel with LLVM]] [[http://​​15NpzXW|slides]] [[http://​​TiLPL-zMndM|Video]]
 +2013.02.18: Behan Webster will be presenting a talk at [[http://​​events/​android-builders-summit|Android Builders Summit]]: [[http://​​event/​70c55b4484d89429b4dbb28c28947d4c?​iframe=no&​w=900&​sidebar=yes&​bg=no#​.UQBOoV1QAjI|LLVMLinux:​ Compiling Android with LLVM]] [[http://​​images/​stories/​slides/​abs2013_webster.pdf|slides]]
 +2013.02.02: Jan-Simon Möller will be presenting a lightning talk at FOSDEM: [[https://​​2013/​schedule/​event/​the_llvmlinux_project/​|The Linux Kernel with Dragon Wings]]
 +2012.08.16: Bryce Adelstein-Lelbach will be giving a talk on [[http://​​events/​linuxcon/​schedule|LLVM-compiled Linux for the Real World]] at [[http://​​events/​linuxcon|LinuxCon NA]]
 +2012.08.16: An [[http://​​2012:​llvm|LLVM micro-conference]] has been added to this year's [[http://​​2012/​|Linux Plumbers Conference]]. Mark Charlebois and Behan Webster will talking about [[http://​​lpc-2012/​meeting/​134/​lpc2012-llvm-linux-build-status/​|LLVM Toolchain - Update and State of Building Linux with LLVM]] and Jan-Simon Moeller will be talking about [[http://​​lpc-2012/​meeting/​144/​lpc2012-llvm-kernel-build/​|LLVM/​Clang x86 Kernel Build]].
 +2012.08.13: A [[http://​​2012:​llvm|LLVM microconference]] has been setup for this year's [[http://​​2012/​|Linux Plumbers Conference]]. Several project contributors will be giving talks during the microconference.
 +===== 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
 +===== Who Else is Using Clang/LLVM? =====
 +  * Intel is using LLVM for [[http://​​devmtg/​2011-11/​Rotem_IntelOpenCLSDKVectorizer.pdf|OpenCL]]
 +  * Google is using LLVM for [[http://​​devmtg/​2011-11/​Hines_AndroidRenderscript.pdf|Renderscript in Android]]
 +  * nVidia is using LLVM in [[http://​​cuda-llvm-compiler|CUDA]]
 +  * Apple Computer is using Clang in Xcode for all of its OSX and iPhone development
 +  * Debian has started trying to [[http://​​|build its package repository with LLVM]]
 +  * [[http://​​Users.html|Full list from the site]]
llvmlinux.txt · Last modified: 2017/12/04 22:06 by emsearcy