(clang-)Tidying up includes in systemd
- Track: LLVM
- Room: UD6.215
- Day: Saturday
- Start: 18:20
- End: 18:40
- Video only: ud6215
- Chat: Join the conversation!
This year, systemd had a breakup with its bad practice of including unused headers all over the codebase. This resulted in:
- A 33% speedup in from scratch build times
- A 50% reduction in runtime for our build test CI jobs
- Thousands of lines of code removed from the codebase
I'll present how I went about this work, using clang-include-cleaner, clang-tidy and ClangBuildAnalyzer, and including the challenges I faced:
- A scalable way to organize source to minimize unused headers
- Macros
- Different build configurations which change the used headers in a source file due to #ifdef conditionals
- Missing features in clang-tidy and clang-include-cleaner (and my contributions to LLVM to implement those)
https://github.com/systemd/systemd https://github.com/llvm/llvm-project github.com/aras-p/ClangBuildAnalyzer
Speakers
| Daan De Meyer |