Edited my comment now, forgot I was caching the release builds with sccache so wasn't actually compiling all the units, but fetching a lot of them instead :/
Re:Cranelift code generation comes to Rust
by vlovich123 on Monday March 18, 2024 @01:37PM
(#39747394)
Which speaks to maybe that cargo should just ship with sccache turned on by default so that the “normal” experience for developing Rust has this seamless experience. Intelligent caching should always win. I’d like to see rustc get sccache integration that works at the MIR level too so that changing something that doesn’t change the code gen meaningfully still gets a cached response (e.g. changing some comments/whitespace, moving functions around, etc).
Even cooler would be if LLVM itself could also cache internal expensive parts of compilation and optimization across process instances. That would make a huge impact in cutting down incremental builds.
Re:Cranelift code generation comes to Rust
by SkiFire13 on Monday March 18, 2024 @03:12PM
(#39748631)
> I’d like to see rustc get sccache integration that works at the MIR level too so that changing something that doesn’t change the code gen meaningfully still gets a cached response (e.g. changing some comments/whitespace, moving functions around, etc).
Isn't incremental compilation already like that?
https://news.ycombinator.com/item?id=39721922