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.74k stars 540 forks source link

sccache doesn't support c++module well #2216

Open diablohsh opened 2 months ago

diablohsh commented 2 months ago

In a C++20 project utilizing Clang-18 and CMake 3.28.3 on Ubuntu 24.04, when C++ modules are enabled, sccache fails to cache the correct compilation results. It appears that it cannot distinguish between the same .cpp file importing different versions of modified C++ modules, leading to the reuse of incorrect cached files. Consequently, this results in a SIGSEGV during the execution of the generated executable. Disabling sccache resolves the issue.

AJIOB commented 2 months ago

Looks like it's the similar to #2095