mozilla / sccache

Sccache is a ccache-like tool. It is used as a compiler wrapper and avoids compilation when possible. Sccache has the capability to utilize caching in remote storage environments, including various cloud storage options, or alternatively, in local storage.
Apache License 2.0
5.85k stars 552 forks source link

Add option to terminate sccache server process immediately #394

Open s4i opened 5 years ago

s4i commented 5 years ago

When compiling using sccache on both Windows 10 and WSL, the procedure for stopping the process is required.

jwatt commented 5 years ago

I'm not an sccache developer, but can you explain why you require this (or why it would be useful)?

glandium commented 5 years ago

Isn't sccache --stop-server what you're looking for?

s4i commented 5 years ago

Thank you for your reply.

@jwatt Compiling with sccache and cargo can not be performed simultaneously with Command prompt and WSL because file closing after compilation isn't performed correctly. The reason I think file closing is failing is that the project folder can't be deleted as long as the sccache process exists.

@glandium It was better to double-click the following batch than to write "&& sccache --stop-server" at the end of the cargo command.

@echo off
sccache.exe --stop-server
wsl sccache --stop-server

I'm looking for a way to get rid of the warning below.

error: failed to run `rustc` to learn about target-specific information

Caused by:
  process didn't exit successfully: `sccache rustc - --crate-name ___ --print=file-names --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro` (exit code: 2)
--- stderr
error: failed to execute compile
caused by: Failed to send data to or receive data from server
caused by: Failed to read response header
caused by: failed to fill whole buffer