# Kache v0.21:caching C/C++ links,nvcc objects,and the Clang-CL flags Firefox uses

> Source: <https://github.com/kunobi-ninja/kache/releases/tag/v0.21.0>
> Published: 2026-09-14 08:29:53+00:00

[pecorino-bot](/pecorino-bot)released this

[1 commit](/kunobi-ninja/kache/compare/v0.21.0...main)to main since this release

This release caches more of a real C/C++ compile: opt-in whole-program links, preprocessor `-E` to stdout, and the clang-cl flags Firefox Windows actually passes. Single-source `nvcc -c` is cached. A machine can set defaults under the job file, and a trusted node disk can isolate stores with `KACHE_TRUST_DOMAIN`.

```
cargo install kache --locked --version 0.21.0
```

Homebrew, Scoop, and the [GitHub release binaries](https://github.com/kunobi-ninja/kache/releases/tag/v0.21.0) also ship 0.21.0.

## Highlights

- **Links and `-E`:** C/C++ whole-program links cache when you opt in.`-E` without`-o` stores the expansion and reprints it on stdout.
- **Windows C++:** clang-cl`-Oy` ,`-Zl` ,`/fp:fast` , and`/clang:…` are keyed, so those Firefox TUs stop passing through.
- **CUDA and the machine:**`nvcc -c` is cached.`/etc/kache/config.toml` is the host layer.`KACHE_TRUST_DOMAIN` scopes a persistent local store.

## Added

- 
**cc:** Whole-program links and their sidecars cache when`KACHE_CACHE_CC_LINKS` is on. Off by default. Restored binaries are signed on macOS;`.dSYM` directories store as`{name}.dsym.tar` . Include search treats a file in the middle of a`-I` path like a missing directory. Closed-set`-m` flags are keyed. Windows cargo-linker wrappers follow`MOZ_CARGO_WRAP_(HOST_)LD` . ([#1040](https://github.com/kunobi-ninja/kache/pull/1040) ,[#1044](https://github.com/kunobi-ninja/kache/pull/1044) by[@jleni](https://github.com/jleni) )

```
[cache]
cache_cc_links = true
export KACHE_CACHE_CC_LINKS=1
```

- 
**cc:**`-E` without`-o` stores the expansion as a`stdout.i` blob and writes it back to process stdout on a hit. Named`-E -o file.i` already cached.`-o -` still passes through. ([#1053](https://github.com/kunobi-ninja/kache/pull/1053) by[@jleni](https://github.com/jleni) )
- 
**nvcc:** Single-source`-c` compiles go through the local store and remote.`-march=native` ,`-arch=native` , and mode-changing`NVCC_PREPEND_FLAGS` /`NVCC_APPEND_FLAGS` refuse instead of sharing a key across machines. ([#1038](https://github.com/kunobi-ninja/kache/pull/1038) ,[#1042](https://github.com/kunobi-ninja/kache/pull/1042) ,[#1050](https://github.com/kunobi-ninja/kache/pull/1050) by[@jleni](https://github.com/jleni) )
- 
**config:**`/etc/kache/config.toml` is read under the chosen file. Env still wins.`KACHE_HOST_CONFIG` points at another host file; empty turns the layer off.`kache doctor` names which host key a job overrides. ([#1039](https://github.com/kunobi-ninja/kache/pull/1039) by[@jleni](https://github.com/jleni) )
- 
**cache:**`KACHE_TRUST_DOMAIN` isolates the store at`$KACHE_CACHE_DIR/<label>/` . One path component (`[A-Za-z0-9._-]` ). Invalid labels leave the path unchanged. Keep`KACHE_RUNTIME_DIR` on job scratch. Do not set this on public or fork jobs. ([#1046](https://github.com/kunobi-ninja/kache/pull/1046) by[@jleni](https://github.com/jleni) )

```
export KACHE_CACHE_DIR=/var/cache/kache
export KACHE_TRUST_DOMAIN=github.kunobi-ninja.kache
export KACHE_RUNTIME_DIR="$RUNNER_TEMP/kache-runtime"
```

- 
**telemetry:**`kache stats` and`kache telemetry write` report index/WAL size and last GC.`KACHE_RECORD_SESSIONS=1` appends session and GC logs under the cache dir. Off by default. ([#1041](https://github.com/kunobi-ninja/kache/pull/1041) by[@jleni](https://github.com/jleni) )

## Fixed

- **cc:** clang-cl`-Oy` (omit frame pointer),`-Zl` ,`/fp:fast` ,`/clang:<flag>` ,`-fcxx-exceptions` , and`-ffreestanding` are classified. ([#1048](https://github.com/kunobi-ninja/kache/pull/1048) ,[#1049](https://github.com/kunobi-ninja/kache/pull/1049) by[@jleni](https://github.com/jleni) )
- **shims:** Homebrew compiler shims point at`opt/<formula>/bin/kache` , so they survive formula upgrades. Legacy keg links migrate. ([#1043](https://github.com/kunobi-ninja/kache/pull/1043) by[@achembarpu](https://github.com/achembarpu) ,[#1045](https://github.com/kunobi-ninja/kache/pull/1045) by[@jleni](https://github.com/jleni) )

## Docs

- CUDA getting-started for `nvcc -c` . ([#1042](https://github.com/kunobi-ninja/kache/pull/1042) by[@jleni](https://github.com/jleni) )
- CI node-local store: `KACHE_TRUST_DOMAIN` and`KACHE_RUNTIME_DIR` . ([#1046](https://github.com/kunobi-ninja/kache/pull/1046) by[@jleni](https://github.com/jleni) )

## New Contributors

- [@achembarpu](https://github.com/achembarpu) made their first contribution in[#1043](https://github.com/kunobi-ninja/kache/pull/1043)

## Contributors

**Full changelog:** `v0.20.0...v0.21.0`
