The State of Compilation Database in Bazel
summary
Compares four concrete ways to produce compile_commands.json for Bazel: running a capture tool like Bear (requires client mode or disabling sandbox and a real full build), injecting extra actions (full build, action listener, experimental flag), querying the analysis graph with action graph query (no full build but misses tree artifact–generated actions), and using aspects which here reuse the C++ action object so argv is expanded at execution to capture commands for action templates that create tree-artifact compiles — aspects are chosen and work for tree artifacts.
AI-written summary · about
chapters (8)
- 0:00Introduction
- 1:26Generating compilation DB in Bazel
- 2:08Build approach explained
- 3:13Extra actions for compilation DB
- 4:38Action graph query overview
- 6:01Aspect-based compilation DB
- 7:29Handling tree artifacts
- 9:59Conclusion and future collaboration
related talks
31mBazel: Do We Really Need Another Build Tool?
23mPolyglot Builds with Bazel
06mLightning Talk: Do You Love or Hate Your C++ Build System?
56mWar story from the build system trenches: Integrating Bazel and Testwell CTC++ code coverage
09mLightning Talk – Bazel UI
19mExploring Scala Tooling ecosystem
21mFast/Correct: Choose two using Bazel for a monorepo
16mHermetic builds with Bazel
