siso: Introduce 'siso fs gc' subcommand for target build label cleanup

Adds the `siso fs gc` CLI subcommand to enable mathematical build label
garbage collection against the HashFS `.siso_fs_state` ledger.

This tool allows developers and continuous integration workers to sweep
orphaned or evicted build target artifacts from disk while preserving
shared libraries and header caches.

Key capabilities:
- Supports positional regex target eviction (`siso fs gc "target-.*"`)
- Supports LRU build cache bounding (`siso fs gc --retain_last_x=3`)
- Protects shared files using bitwise intersection (`(fileMask & keepMask) == 0`)
- Includes `--dry_run` flag for non-destructive simulation and reporting
- Exports structured metrics to `siso_metrics.json` for telemetry pipelines

Also introduces an E2E integration test suite under
`subcmd/ninja/e2etests/fs_gc_test.go` and wires `--build_label`
into `setupBuild` in `utils_test.go`.

This is the 4th CL for go/targeted-build-cleaning.

BUG=446692498
TAG=agy
Change-Id: I096d9ed17b0163142212f96b7d9d40f497abe4ad
Reviewed-on: https://chromium-review.googlesource.com/c/build/+/8183971
Reviewed-by: Yuke Liao <liaoyuke@google.com>
Commit-Queue: Saatvik Sharma <sharmasaatvik@google.com>
19 files changed
tree: 34c87ce411908af9054da855db4ee3e268fbfbef
  1. bench/
  2. gong/
  3. hashigo/
  4. infra/
  5. kajiya/
  6. kzipinfo/
  7. remote-apis/
  8. runmc/
  9. siso/
  10. .gitignore
  11. .golangci.yml
  12. .style.yapf
  13. BUILD_OWNERS
  14. BUILD_TEAM_OWNERS
  15. CONTRIBUTING.md
  16. LICENSE
  17. OWNERS
  18. PRESUBMIT.py
  19. README.md
  20. WATCHLISTS
README.md

build.git repository

This repository contains tools developed and owned by the Chrome Build Team.

Quick start

The steps for getting the code are:

  1. Install depot_tools
  2. Run git clone https://chromium.googlesource.com/build

We use the standard Go module workflow to work on our projects.

Links