@alexcrichton noted that sccache breaks an assumption that the Rust build system has about invoking MSVC, namely that it can set environment variables like INCLUDE and LIB on a per-compile basis to avoid having to have them set in the shell. Currently sccache uses the environment that the server process was invoked with as the environment for running all compiler processes, but that doesn't have to be the case. We can send the environment over with the compile request and use it for invoking the compiler.
We might need to add certain environment variables to the hash key to make this work, I'd have to look into it. INCLUDE should only affect the preprocessor, and that output is already included in the hash key. Looking at the other CL environment variables, it doesn't look like there's anything else that would cause problems.