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.
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.
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.