-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[CMake] Configure ccache using command line options #134857
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Since ccache 4.8, it is possible to pass configuration options directly to ccache on the command line as opposed to through environment variables. This is the intended way for CMake to configure ccache, as described on the GitHub wiki for the project: https://github.com/ccache/ccache/wiki/CMake This should allow for uniform ccache configuration that does not rely on platform-specific environment setup. Rework the way ccache is configured by LLVM accordingly. Signed-off-by: Kajetan Puchalski <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM other than the one comment!
As suggested, reposting the changes to how we configure ccache on their own. This should be a non-functional change for Linux, but for Windows it should enable us to configure ccache in cases where previously we'd error with |
8199b45
to
7d7d282
Compare
I've checked this on Windows as well and it looks like it works there too. Thanks! |
Given that this is effectively the same as what was previously agreed on but with the shortcomings fixed, should we just give it a try to have it run through the buildbots? |
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/117/builds/8684 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/7/builds/13411 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/88/builds/10418 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/160/builds/16303 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/180/builds/16292 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/54/builds/8251 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/155/builds/8386 Here is the relevant piece of the build log for the reference
|
This reverts commit 904f1b1.
Nope, had to revert again. I think what's happening is that on some of those Windows machines if neither LLVM_CCACHE_MAXSIZE nor LLVM_CCACHE_DIR are set, then LLVM_CCACHE_PARAMS stays like what it is set to in the snippet below and turns into "C:\ninja\ccache.exe run_second_cpp=true hash_dir=true" as opposed to that but without surrounding quotemarks which is what we want. I'm not sure how to reliably get around this while keeping LLVM_CCACHE_PARAMS as a CACHE STRING as opposed to making it into a list from the get-go.
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/33/builds/14857 Here is the relevant piece of the build log for the reference
|
Since ccache 4.8, it is possible to pass configuration options directly to ccache on the command line as opposed to through environment variables. This is the intended way for CMake to configure ccache, as described on the GitHub wiki for the project: https://github.com/ccache/ccache/wiki/CMake This should allow for uniform ccache configuration that does not rely on platform-specific environment setup. Rework the way ccache is configured by LLVM accordingly. --------- Signed-off-by: Kajetan Puchalski <[email protected]>
Does anyone have thoughts on which direction we should take this in? If we can't reliably configure ccache on Windows, should we just disable precompiled headers for Windows ccache builds and roll them out only for Linux for the time being? |
Since ccache 4.8, it is possible to pass configuration options directly to ccache on the command line as opposed to through environment variables.
This is the intended way for CMake to configure ccache, as described on the GitHub wiki for the project:
https://github.com/ccache/ccache/wiki/CMake
This should allow for uniform ccache configuration that does not rely on platform-specific environment setup.
Rework the way ccache is configured by LLVM accordingly.