Skip to content

Conversation

@KOLANICH
Copy link

Utilizing CCache is especially useful when one realizes he misses a feature and so recompiles the tool with that feature enabled. Or when one realizes he has accidentially enabled a feature unavalable on his platform, so compilation fails and one has to recompile. In that case without CCache CMake has to cause recompile from scratch since it alters the preprocessor. CCache is capable to detect the recompilation from scratch is not needed and to reuse the suitable artifacts from previous builds.

Signed-off-by: KOLANICH <KOLANICH@users.noreply.github.com>
@tkonolige
Copy link
Contributor

Hi @KOLANICH, thanks for submitting a PR!

Historically, we did have ccache enabled by default if it was installed. I think there were some issues with using ccache with hexagon, so it was disabled in #11189. If you want to use cmake with your builds you can run cmake -DCMAKE_CXX_COMPILER_LAUNCHER=ccache ... when you configure cmake. If you'd like to try and get it enabled by default for everyone using TVM, you can try adding these lines https://github.com/apache/tvm/pull/11189/files#diff-1e7de1ae2d059d21e1dd75d5812d5a34b0222cef273b7c3a2af62eb747f9d20aL769-L796 back in and seeing if hexagon will still build.

@tkonolige
Copy link
Contributor

Actually I've created a PR to re-enable ccache here: #12839

@KOLANICH
Copy link
Author

If you want to use cmake with your builds you can run cmake -DCMAKE_CXX_COMPILER_LAUNCHER=ccache ... when you configure cmake.

I have tried this first (but not when configuring, I have edited using cmake-gui), but I got some errors of interaction between CMake and ninja (that have forced me into cleaning CMake cacheand starting from scratch several times), so I resorted to this way.

Actually I've created a PR to re-enable ccache here: #12839

Thanks, I have left my comment there.

@KOLANICH
Copy link
Author

CMAKE_CXX_COMPILER_LAUNCHER

My bad, I have used CMAKE_CXX_COMPILER + CMAKE_CXX_FLAGS. Thanks for reminding me that var exists.

@KOLANICH KOLANICH closed this Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants