]> git.ipfire.org Git - thirdparty/ccache.git/commit
Allow -fmodules in direct depend mode (#482)
authorLuboš Luňák <l.lunak@centrum.cz>
Thu, 14 Nov 2019 19:17:22 +0000 (20:17 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Thu, 14 Nov 2019 19:17:22 +0000 (20:17 +0100)
commit3eb2483f66fc482df3bf31616d35daedc5ac49cc
treefd68913dda6458a6b3181aa40e113bc105fb335f
parent87fdad7aae3f003cd1ac0eb9500a3dc1aa05ed4a
Allow -fmodules in direct depend mode (#482)

Clang creates the internal on-disk representation of modules
in the background on demand as necessary. This means that ccache does
not need to cache that, all that it needs to cache is the actual
compilation result and the dependencies. Which in the case of modules
includes also the module.modulemap files, and Clang outputs such
dependencies correctly only in the depend mode, in the preprocessed
output there is no way to find out the module dependencies.

Therefore support -fmodules in direct depend mode by more or less
ignoring it. Tested with source build of LLVM/Clang configured
with -DLLVM_ENABLE_MODULES=On (and the build actually occassionally
fails because of module problems, but that happens regardless of ccache).

See also pull request #130 (and this reuses the tests from there).
doc/MANUAL.adoc
src/Config.cpp
src/ccache.cpp
src/ccache.hpp
src/compopt.cpp
src/stats.cpp
test/run
test/suites/modules.bash [new file with mode: 0644]