GCCs options -fprofile-generate and -fprofile-use are used for profile guided optimization. It depends on the ability to locate the profile data files (.gcda) after running the executable with the training data. However, ccache prevents the compiler from finding the correct profile data file. Therefore the following patch disables the caching when one of the
flags is found.
patch by Clemens Rabe <email@example.com>
Created attachment 5257 [details]
Thanks. The -fprofile-arcs flag was already taken care of in the dev repo, but the rest of the patch was committed as 3eaee4c2a7c9992547585e416f51da1a6337e167.