# Install clang-build-analyzer with Homebrew, Nix

Tool to analyze compilation time. Version 1.6.0 via Homebrew; verified from local package data. Also installable with nix: nix profile install nixpkgs#clangbuildanalyzer.

## Install

```sh
sudo av install brew:clang-build-analyzer
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install clang-build-analyzer
```

  Evidence: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#clangbuildanalyzer
```

  Evidence: nixpkgs package indexes: pkgs/by-name/cl/clangbuildanalyzer/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:clang-build-analyzer
- **Package manager:** Homebrew
- **Version:** 1.6.0
- **Source summary:** Tool to analyze compilation time
- **Homepage:** <https://github.com/aras-p/ClangBuildAnalyzer>
- **Repository:** <https://github.com/aras-p/ClangBuildAnalyzer>
- **Generated:** 2026-08-03T19:37:03+00:00

## Executables

- ClangBuildAnalyzer (alias)

## Install behavior

- Bottle: not available

## Freshness

- Page generated: 2026-08-03
- Package-manager version: 1.6.0
## Project history and usage

Clang Build Analyzer is a C and C++ build analysis tool that aggregates Clang -ftime-trace JSON files and reports where compilation time is spent. It is a package-nerd tool for people optimizing slow native builds rather than a general application framework.

### Project history

The repository was created in August 2019 after Clang 9 introduced -ftime-trace. The README says the tool takes the single-file trace output generated by Clang and aggregates many compilation traces into summaries of slow files, templates, functions, code generation, and expensive headers.

### Adoption history

The supplied package-manager data lists Homebrew and Nix packaging. Release metadata shows an initial 1.0.0 release labeled 'Initial release' and later releases tracking newer Clang support, including Clang 19 support in 1.6.0.

### How it is used

A typical workflow starts capture with ClangBuildAnalyzer --start, builds with Clang 9 or later using -ftime-trace, stops capture with --stop, and runs --analyze on the produced capture file. A ClangBuildAnalyzer.ini file in the working directory controls how many expensive files, templates, functions, and headers are reported.

### Why package nerds care

It matters because it packages a practical workflow around a compiler diagnostic format. For large C++ codebases, it turns a pile of per-object JSON traces into actionable package-maintainer and build-engineer questions: which headers, templates, source files, or compiler phases are costing rebuild time?

### Timeline

- 2019: Repository created after Clang 9 documented -ftime-trace.
- 2020: v1.0.0 initial release published on GitHub.
- 2020: v1.2.0 focused on optimizations for large builds.
- 2023: v1.5.0 improved expensive-header information.
- 2025: v1.6.0 added Clang 19 support and fixes.

### Related projects

- Related projects include Clang, LLVM, Clang's -ftime-trace support, Chrome trace viewers, speedscope.app, and native build systems such as Make, CMake, Xcode, and Visual Studio.

### Sources

- <https://github.com/aras-p/ClangBuildAnalyzer>
- <https://raw.githubusercontent.com/aras-p/ClangBuildAnalyzer/main/readme.md>
- <https://raw.githubusercontent.com/aras-p/ClangBuildAnalyzer/main/ClangBuildAnalyzer.ini>
- <https://api.github.com/repos/aras-p/ClangBuildAnalyzer/releases>
- <https://releases.llvm.org/9.0.0/tools/clang/docs/ReleaseNotes.html>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: ./ClangBuildAnalyzer.ini
## Other Package-Manager Records

- Nix - clangbuildanalyzer: installed executable or alias match | nixpkgs package indexes: pkgs/by-name/cl/clangbuildanalyzer/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/clang-build-analyzer.yml](https://github.com/mxcl/pkgdb/blob/main/combined/clang-build-analyzer.yml)


## Sources

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
