LLVM

From OSDev.wiki
Revision as of 23:28, 13 September 2017 by osdev>Minoto
Jump to navigation Jump to search

LLVM is a compiler infrastructure for several languages. It consists of clang (c compiler), the llvm library (includes llvm-mc the assembler) and lld the linker. The llvm library can be used to create several languages like rust.

OS Development with LLVM

LLVM recently has been used in development of BSDs.

One good thing about LLVM is that it is cross-compiler by design.

The following command gives the supported architectures

llc -version

As it is a cross compiler by default, clang can called to compile i686-elf for the simply by

clang -target i686-elf

Building LLVM

Main article: LLVM Cross-Compiler