Closed breezewish closed 3 months ago
Sorry I don't know much about ccache, can't offer any help here. Anyway, pull requests are welcome to improve this!
Maybe one way is to not touching the compiler proxy file when the file exists and has the same content as we desired.
Sounds good as an optimization regardless of ccache issue anyway.
Hi,
I'm using cargo-zigbuild to build https://github.com/tikv/rust-rocksdb using this command:
It turns out that although rust-rocksdb/librocksdb-sys has configured ccache, the ccache is always invalidated, when command above is invoked multiple times.
pstree shows that ccache is called against this compiler: cargo-zigbuild/0.18.3/zigcxx-x86_64-unknown-linux-gnu.2.17.sh
ccache debug log shows that this compiler proxy is re-generated every time, causing ccache fail to cache:
Build 1:
Build 2:
One way to workaround is to configure ccache to use compiler content to check:
This makes cache slower, and is not a default option for users.
Is it possible to improve this behavior? Thanks!