Repository navigation
template: build with the yeet CLI's toolchain; cargo-style output - #38
Merged
Merged
Conversation
build/toolchain.mk now prefers the toolchain managed by the yeet CLI: with `yeet` on PATH every tool runs as `yeet toolchain exec <tool>`, sharing the CLI's single install instead of filling a second cache. If none is installed, the `toolchain` target installs the version pinned in build/toolchain.lock as the default; if a different default already exists it warns rather than switching it. `make YEET=` forces the lock-pinned cache path, which CI and yeet-less hosts keep using. Toolchain paths (libbpf headers, veristat, qemu) are resolved lazily and memoized: make expands variables at parse time, and the install happens in a target, so every consumer runs after `| toolchain` while clean and postgen never trigger a lookup or install. A tool may now be a multi-word command: existence checks probe its first word, postgen runs git instead of testing for a file, and gen-vmlinux.sh receives the bpftool command quoted and word-splits it deliberately. kernel-matrix.sh prefers the qemu bundled with the yeet toolchain. New build/ui.mk gives the build cargo-style status lines: a bold green verb right-aligned to 12 columns on stderr, color only on a terminal with NO_COLOR honored, each command echoed under its line, QUIET=1 for status only, and a Finished line with elapsed time. gen-vmlinux.sh drops the partial header on failure and filters bpftool's "loaded as base" note. The toolchain.mk and fetch-toolchain.sh changes are mirrored into toolchain/embed/ and need to land in yeet-src/toolchain before the next `make sync-toolchain`, which overwrites them from the tag.
This was referenced Oct 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Use the yeet CLI's toolchain.
build/toolchain.mknow tries two sources in order:yeeton PATH, every tool runs asyeet toolchain exec <tool>from the toolchainyeet toolchain defaultpoints at. One install shared with the CLI, no second ~200 MB copy under~/.cache. If nothing is installed, thetoolchaintarget runsyeet toolchain install <pinned> --default(the lock's version;latestwithout a lock). If a different default already exists it prints a warning instead of switching it.make YEET=, the existing lock-pinned cache fetch. CI and yeet-less hosts are unchanged.Toolchain paths (libbpf
-I, veristat, qemu) are resolved lazily and memoized, because make expands variables at parse time while the install happens in a target. Everything that needs a path runs after| toolchain;make clean/make postgennever trigger a lookup or install.Collateral: a tool may be a multi-word command, so existence checks probe
$(firstword …),postgenruns git rather than testing for an executable file, andgen-vmlinux.shtakes the bpftool command quoted and word-splits it.kernel-matrix.shprefers the qemu bundled with the yeet toolchain before downloading one.Cargo-style output. New
build/ui.mk:Bold green verbs on stderr (stdout stays clean for piping), color only when stderr is a tty with
TERM != dumbandNO_COLORunset, commands echoed under their status line,make QUIET=1for status lines only. Compiler diagnostics pass through untouched; missing tools print a rederror:line. esbuild's summary and bpftool's "loaded as base" note are silenced;gen-vmlinux.shdeletes the partial header on failure.Test plan
scripts/newscaffold builds throughyeet toolchain execwith zero warnings;make YEET=builds from the cache.make cleanandmake postgeninstall nothing; a singlemakeinstalls v0.10.1 as default and builds with the correct include path in the same invocation.make -nhas no side effects.make clangdpoints at yeet's libbpf headers;make -n veristat/veristat-matrixresolve a real binary path.QUIET=1, stdout-only capture is empty, deliberate compile error and bogusCLANG=surface,make -j4from clean.make veristat-matrix(boots VMs; not run).