17:20
-
17:40
-
17:40
Day 1
(clang-)Tidying up includes in systemd
<p>This year, systemd had a breakup with its bad practice of including unused headers all over the codebase. This resulted in:</p>
<ul>
<li>A 33% speedup in from scratch build times</li>
<li>A 50% reduction in runtime for our build test CI jobs</li>
<li>Thousands of lines of code removed from the codebase</li>
</ul>
<p>I'll present how I went about this work, using clang-include-cleaner, clang-tidy and ClangBuildAnalyzer, and including the challenges I faced:</p>
<ul>
<li>A scalable way to organize source to minimize unused headers</li>
<li>Macros</li>
<li>Different build configurations which change the used headers in a source file due to #ifdef conditionals</li>
<li>Missing features in clang-tidy and clang-include-cleaner (and my contributions to LLVM to implement those)</li>
</ul>
<p>https://github.com/systemd/systemd
https://github.com/llvm/llvm-project
github.com/aras-p/ClangBuildAnalyzer</p>