LLVM_CCACHE_BUILD is deprecated

Hi!

Just a quick heads up that I just pushed this change to main: :gear: D143468 [CMake] Remove custom ccache CMake logic (llvm.org)

This means that setting LLVM_CCACHE_BUILD=ON will no longer work. In order to use ccache, we should now use the upstream CMake support -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache.

So if your build scripts are using LLVM_CCACHE_BUILD you need to update those.

3 Likes

Looking at the buildbots it seems like many bots are using this configuration, so I’ll revert this one for now and hope that this post will cause people to update the configuration to use CMAKE_C/CXX_COMPILER_LAUNCHER instead (which is safe to switch to already now).

1 Like

It didn’t.

I just wasted nontrivial time investigating this before someone pointed me at this post. May I suggest that emitting a deprecation warning as status and/or adding a comment at this point in the code about the deprecation would be the right thing to do?

I reverted the change and it was not removed by me. Maybe someone else did?

I’m using this regularly, it still works for me!

The PowerPC Linux bots have been updated to use the new cmake support for ccache.

@tobiashieta You landed this in [CMake] Remove custom ccache CMake logic · llvm/llvm-project@0fad18c · GitHub and reverted 15 minutes later in Revert "[CMake] Remove custom ccache CMake logic" · llvm/llvm-project@fff762d · GitHub

I support the direction. I wonder if this is going anywhere, or you identified some hard obstacles?

I’m still regularly using this, I find this extremely convenient to find in the CMakeCache / config and switch.
Right now the motivation to remove this is unclear to me: this does not seem to be a maintenance drag!

I agree. Let’s keep this convenience option around.

Seconded, I don’t see a point in deprecating existing CMake options that can easily be converted into the new version.