War story from the build system trenches: Integrating Bazel and Testwell CTC++ code coverage
summary
Integrates Bazel with Testwell CTC++ by wrapping CDC++ with per-compilation hooks that rewrite timestamps, absolute sandbox paths and fingerprints so instrumented sources and symbol files become reproducible; writes one symbol file per compilation, embeds those files into object files as a CDC sim ELF section, extracts and concatenates them at link time, and re-enables Bazel caching for builds. Full clean coverage still takes ~30–45 minutes, common incremental runs are about five times faster, tests/counter data remain uncached. Bazel sandbox and CDC++ mon.sim handling are central.
AI-written summary · about
chapters (14)
- 0:00Introduction and speaker background
- 1:12Why this talk about Bazel and CTC++
- 6:50Complexity in build systems explained
- 13:47Deep dive into Bazel features and challenges
- 21:06Testwell CTC++ code coverage fundamentals
- 24:30Initial attempt to integrate Bazel and CTC++
- 29:22Side quests and sandboxing issues
- 34:47Making outputs reproducible for caching
- 41:22Embedding symbol files in object files
- 45:33Recap of the first integration solution
- 46:58Second solution with reproducible outputs
- 50:06Performance improvements and results
- 52:54Lessons learned and future work
- 53:16Closing remarks and Q&A
related talks
06mLightning Talk: Do You Love or Hate Your C++ Build System?
10mThe State of Compilation Database in Bazel
31mBazel: Do We Really Need Another Build Tool?
11mPerformant Bazel Builds for Web Monorepos at Scale
23mPolyglot Builds with Bazel
42mMake local development (with Bazel) great again!
16mHermetic builds with Bazel
21mFast/Correct: Choose two using Bazel for a monorepo
