Consider supporting clcache




Build Config
10 months ago
6 months ago


(Reporter: xidorn, Unassigned)


Firefox Tracking Flags

(Not tracked)



There is a compiler cache for MSVC we should probably try and integrate into our build environment.

I tried it myself via setting CC and CXX to clcache, but it doesn't seem to work as expected. I guess our build system currently pretty much relies on using the original cl.exe, and probably even hardcoded that somewhere.

The first issue I met was that configure reports:
> Cannot determine the Visual C++ directory the compiler...

so I copied clcache directory into MSVC's bin directory. But latter, I found that clcache doesn't seem to be doing anything, since its statistics isn't updated at all, and in objdir/config.status, CXX is still cl.exe.

I have no idea what needs to be done for it to work, so I give up and file a bug here.
RyanVM, do you think we should add this to MozillaBuild as part of our Windows build toolchain?
Flags: needinfo?(ryanvm)
I think we'd prefer to add sccache (, which has the additional benefit of handling Rust code and being tested on our infra.
Oh, okay, I forgot that... Hope that support MSVC and can be included in our Windows toolchain.
Flags: needinfo?(ryanvm)
I have exactly zero time to figure out how to make that work. Happy to ship it somewhere in the PATH if others want to commit to doing something with it from there, but that's the only thing I can commit to.
I'm going to get release binaries of sccache enabled at some point and we'll be able to just fetch those. Currently I still build the binaries we use in automation on my local machines.
You need to log in before you can comment on or make changes to this bug.