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

Incorrect .ninja_deps generated during cache hits #2228

Closed njames93 closed 2 weeks ago

njames93 commented 4 months ago

Compiling a c(++) project using cmake with ninja and gcc and an unpopulated cache results in a correct compilation and the .ninja_deps file being populated.

However removing the build directory and re-running cmake and ninja create a .ninja_deps file that contains no dependencies for each translation unit.

This is breaking ninja's dependency tracking and results in edits to header files not causing any translation units that include those headers to be re-compiled

Environment

sylvestre commented 4 months ago

would it be possible to provide some STR ? thanks

njames93 commented 4 months ago

would it be possible to provide some STR ? thanks

Sorry a little confused by STR, Is this some kind of minimal reproducer?

AJIOB commented 3 months ago

It looks similar to my #2073 issue, that contains a workaround for similar case.

@njames93, can you recheck this, please

njames93 commented 2 weeks ago

Sorry, missed this but it appears the issue is resolved