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

Reading budgets cover selected sections, not whole chapters. Link to the book; this site does not reproduce it.

Build Build or investigate

  1. Record OS, CPU, RAM, free disk and compiler versions.
  2. Set up LLVM 17 tools for book exercises.
  3. Create a separate current-main checkout and start a restricted Clang build using the recipe.
  4. 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.

Required to complete day 02

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