Bug fixes and improvements
- Fixed tracking of headers included by indented MSVC include directives, preventing stale direct mode hits if such headers change.
[contributed by Andreas Ringlstetter]
- Fixed false cache hits when a macro definition changes in the source or a header used to create an MSVC precompiled header with /Yc.
[contributed by Dirk Reinbach]
- Made ccache fall back to MSVC for options that explicitly produce or consume C++20 modules. Ccache also tracks IFC files in the working directory for implicit imports.
[contributed by Chris Burr]
- Made ccache fall back to the compiler for too hard MSVC option /dynamicdeopt.
[contributed by Dirk Reinbach]
- Fixed a bug where compiling with -v could report the include search paths from an earlier compilation. This could cause CMake to detect the wrong implicit include directories.
[contributed by Dmitry Sergeevich]
- Ccache now preserves hyperlinks in GCC diagnostics.
[contributed by GitHub user Peter0x44 and Joel Rosdahl]
- Fixed preprocessing with prefix_command_cpp and multiple -arch options.
[contributed by Andreas Ringlstetter]
- Fixed compiler identification when ccache is used as a launcher and the compiler path is itself a symlink or hard link to ccache.
[contributed by Andreas Winther and Joel Rosdahl]
- Fixed fallback to the compiler when DEPENDENCIES_OUTPUT, SUNPRO_DEPENDENCIES or the MSVC variables CL or CL are set.
[contributed by Dirk Reinbach]
- Made ccache fall back to the compiler when converting an argument path fails. Invalid character sequences count as bad compiler arguments and other system errors during argument processing count as internal errors.
[contributed by GitHub user steve_cooks and Joel Rosdahl]
- Fixed cache hits with -o /dev/null and file_clone or hard_link so they leave the null device intact.
[contributed by Dirk Reinbach]
- Ccache now updates the timestamps of files it clones or copies from the cache. On Windows, it now sets file timestamps with subsecond precision. Both changes help prevent unnecessary rebuilds.
[contributed by Dirk Reinbach]
- Made ccache preserve successful compilations when serializing a result or storing a raw file fails. This covers cases such as concurrent MSVC compilations writing to the same /sourceDependencies output.
[contributed by Dirk Reinbach and Joel Rosdahl]
- Fixed temporary file cleanup after failed local cache writes.
[contributed by Joel Rosdahl]
- Made cache writes on Windows more reliable when antivirus or other software briefly holds files open. Ccache replaces open files when Windows allows it and retries renames on access or sharing errors.
[contributed by Dirk Reinbach]
- Fixed error messages for failed renames and copies on Windows and prevented a crash when Windows has no message for an error code.
[contributed by Dirk Reinbach]
Test improvements
- Fixed storage helper tests in working directories with long paths.
[contributed by Joel Rosdahl]