LLVM compilation cache
A compilation cache shared by every worktree, switched on by the xcodebuild and swift shims.
Xcode 16 and Swift 6 can cache compiler output in a content-addressed store (LLVM CAS). By default that cache is tied to a build directory, so a new worktree compiles everything again.
When the active toolchain supports it, the xcodebuild and swift shims turn caching on and point it at ~/.spmx/compilation-cache, so an object already compiled for one worktree can be reused by another. This needs no change to project.pbxproj or any Package.swift.
The shim injects, for example, COMPILATION_CACHE_ENABLE_CACHING=YES and COMPILATION_CACHE_ENABLE_PLUGIN_CACHING=YES. It does not override flags you pass yourself.
Turning it off
SPMX_NO_COMPILE_CACHE=1 xcodebuild -scheme App buildChecking support
spmx doctor # reports whether the active Swift supports LLVM CAS
spmx status # shows whether the cache is enabled for this projectThe cache is trimmed by spmx store prune, which removes files older than the age you choose.