Building a compiler
In this section, we will introduce the different parts of what makes a compiler and how they relate to the LLVM code base. In the process, you will do the following:
- Understand the overall architecture of a compiler
- Learn how to build Clang from the source
- Be able to decide which components of LLVM you need to build
If you are already familiar with the components of a compiler toolchain and want to jump straight into the action, skip directly to the Building LLVM section.
What is a compiler?
The definition of a compiler means different things for different people. For instance, for a student in their first year of computer science, a compiler may be seen as a tool that translates a source language into executable code. This is a possible definition, but it is also a very coarse-grain one.
When you look closer at a compiler, you will find that it is a collection of different tools, or libraries, working together to achieve...