Day 02 of 30 · Compiler foundations
Prepare a reproducible learning environment
- Time
- About 150 minutes: 45 reading, 75 lab, 20 testing, 10 notes.
- Prerequisites
- Day 01: Understand what a compiler does
Toolchain: LLVM 17 and current main
Today touches both toolchains. Keep separate build directories and explicit executable paths: LLVM 17 for book exercises, build/bin/clang++ from current main for Clang work. Setup guide
Learn
- Tool versions, out-of-tree builds and the difference between LLVM 17 and current main.
Read Reading
- R1 · Learn LLVM 17, Second Edition
Chapter 1: prerequisites and build configuration · 30 min - R4 · Getting Started with LLVM + R5
Current build requirements (with R5) · 15 min
Reading budgets cover selected sections, not whole chapters. Link to the book; this site does not reproduce it.
Build Build or investigate
- Record OS, CPU, RAM, free disk and compiler versions.
- Set up LLVM 17 tools for book exercises.
- Create a separate current-main checkout and start a restricted Clang build using the recipe.
- Record its commit SHA.
Done when
Version log, separate build directories and a successful configure; a long build may continue in the background.
Recall question
Which compiler builds Clang, and which Clang binary will you test?
Completion checks
Progress tracking needs JavaScript. The lesson above is complete without it.
Notes
Saved only in this browser. Keep it short enough to finish in ten minutes; none of the prompts are required. All notes, export and import