Replying to myself a little (yeah, I’m crazy like that) …
ninja offers a few ways to navigate the dependencies. My new favorite is certainly
ninja -t browse <target>
This was the way how I discovered at least in part what I was looking for. In order to complete stage 1 one can apparently use
clang-bootstrap-deps (which sort of translates to “all the dependencies required to build stage 2”).
Originally I was building
stage2-install-distribution-stripped which implied
clang-bootstrap-deps, but obviously didn’t stop after that step.
In order to proceed from that point one can
cmake --build . --target stage2-configure (from within the build directory) and subsequently the same with target
stage2-build. Interestingly in my case
stage2-build appears to build more than
stage2-install-distribution-stripped. I guess the distribution simply contains less than the “full build” or some such.
Anyway, in order to investigate all of the different
build.ninja files one can simply search for them, change into the directory with them (respectively) and use
ninja -t browse once again. Relative to the (CMake) build directory I found:
Another curious thing was that the real targets often follow a hierarchical naming convention like
tools/clang/stage2-stamps/stage2-install-distribution-stripped, and a phony target without the “prefix” exists for convenient access to those targets.
My CMake-fu is probably not as strong as that of many in the LLVM community, but I get along and these findings about Ninja was certainly eye-opening.
As I discover more, I’ll amend this thread in the hope that it helps someone else (or myself in a few months from now ).