Precompile bits/stdc++.h in the runner, and move it to clang-tidy 22
Test and publish the site / test (push) Successful in 1m25s
Test and publish the site / publish (push) Successful in 5m18s

The first publish failed its smoke test: on the production host
(2 slow cores) clang-tidy took over 30s on a two-line file and hit the
runner's 20s lint limit, and even a trivial build took 4s, nearly all
of it parsing <bits/stdc++.h>.

The runner image now precompiles that header for g++ (.gch) and clang
(.pch) with the flags the runner passes, and the runner uses them when
they are there. g++ lint gains -O2 so the build's header matches it.
Alpine 3.24's clang-tidy 22 walks far less of the system headers than
3.22's clang-tidy 20. Measured on the host: a build 3.9s to 0.6s, and
clang-tidy 32.5s to 4.3s.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-20 11:43:04 +01:00
co-authored by Claude Opus 5.5
parent af070ffcf9
commit c6b82588b1
5 changed files with 83 additions and 9 deletions
+5 -1
View File
@@ -114,9 +114,13 @@ func ioName(io string) string {
func compile(ctx context.Context, ws *workspace, lang language) Compile {
out := ws.capture("compile.txt")
args := lang.compile
if args[0] == "g++" {
args = withGCCPCH(args)
}
o := proc{
dir: ws.work,
args: lang.compile,
args: args,
stdout: out,
stderr: out,
limits: limits{cpuSec: int(compileTimeout / time.Second), memoryKB: compileMemoryKB, fileBlocks: fileBlocks},