msbuild
msbuild copied to clipboard
MSBuild Clean action deletes files from ccache's cache
Issue Description
ccache is a compiler cache that stores the results of previous compiler invocations to accelerate your builds (even after you clean). It works fine with MSBuild as long as you don't invoke the "Clean" action. When Clean is invoked it deletes the files from ccache's cache (completely outside of my build tree) because the MSBuild's FileTracker noticed the writes that ccache.exe did to its cache folder and thinks it should delete those files. We need a way to specify a deny list for certain folders (like ccache's list) or a "do not track" list of certain executables (ccache.exe in this case) for the FileTracker (I would prefer the second since it will eliminate needless overhead in tracking ccache's reads and writes).
Steps to Reproduce
- Configure ccache using a wrapper script as specified in the docs
- Build your project as normal (from cmd line or Visual Studio). ccache should be invoked via the wrapper script and the cache location should contain the results of the compilations (you can check using
ccache -svto see the stats). Note the number of files in the cache and the size of the cache. - Run the "Clean" target for your project.
- Check the ccache stats again (
ccache -sv). You'll notice that most of the files are gone.
Expected Behavior
MSBuild should not track the files written by ccache and should not delete them when Clean is invoked.
Actual Behavior
Clean action deletes the files from the ccache's cache folder.
Analysis
No response
Versions & Configurations
No response