On Tue, 8 Aug 2023 13:26:22 GMT, Erik Joelsson <er...@openjdk.org> wrote:
> I understand why you need `fix-deps-file` when using `ccache`, but do you > also need `MakeCommandRelative`? I did try it without `MakeCommandRelative`. But it did not work. As the relative paths created by `ccache` itself will look somehow like `dir1/dir2/../../dir3/dir4` which again does not match the intended `dir3/dir4`. > I'm not surprised that ccache support has bit rotted over the years as we > aren't seeing much benefit from it in practice, I do see a big benefit from it. When changing branches by `git checkout` in a single directory it gets perfectly cached. > Note that trying to setup ccache correctly without support in the build is > quite tricky to get right. That's why I thought it necessary to handle it > explicitly in the makefiles. It is not tricky, I am happily using `ccache` for many projects including LLVM, GCC, GDB and others. You only do not have it cached across different directories (without `CCACHE_BASEDIR`) but as I have only 2-3 build trees for each projects (my mind can handle working only on 2-3 different branches at once) it does not matter much. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15080#issuecomment-1669627151