mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-02 03:19:19 +00:00
48c2fcb62b
sccache can only cache compilation units whose --emit includes link. That covers workspace rlibs and nothing else: clippy is metadata-only, and the ~100 test binaries, the rustfs bin and every build script invoke the system linker. So the headline claim that started this — s3select-query costing 17m13s inside a 19m32s nextest build — does not by itself justify sccache, because cargo prints "Compiling" when a crate starts and never when it finishes: that number is the whole compilation tail, not one crate. Adding --timings behind a workflow_dispatch input on Cache Warm answers it with data instead. Read two shares off the report: workspace lib codegen against the whole build, and s3select-query's own rlib. The plan in rustfs/backlog#1601 adopts sccache only above 50% and 25%; if linking dominates instead, the answer is mold/lld plus split-debuginfo, which is precisely the region sccache cannot reach. Off by default: it doubles the ci-dev build, and this only needs running once per question. Nothing about the normal warm path changes. Refs: rustfs/backlog#1598, rustfs/backlog#1601