(clang-)Tidying up includes in systemd
UD6.215 | Day 1 | 18:20 - 18:40 | Speakers: Daan De Meyer
(clang-)Tidying up includes in systemd
Abstract
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
Attachments
Speakers
Links
External Links
Notice: The placeholder video image is licensed under CC BY-SA 4.0. The original image can be found hereChanges made to the image are: Cropped the image to a new ratio, part of the image was cut off.
