Is there way to identify ccache masquaraded as as compiler? #1636
Answered
by
jrosdahl
Andrej730
asked this question in
Questions & answers
-
|
Just out of curiousity really - is there a way to identify ccache masquaraded as as compiler, if it's not a symlink and without renaming it? Is there some flag left that underlying ccache will respond to? |
Beta Was this translation helpful? Give feedback.
Answered by
jrosdahl
Oct 4, 2025
Replies: 1 comment 1 reply
-
|
There is no official way to do that, but here are two hacky ways I can think of: $ gcc -x c -c /dev/null --ccache-skip &>/dev/null && echo ccache || echo not ccache
ccache
$ /usr/bin/gcc -x c -c /dev/null --ccache-skip &>/dev/null && echo ccache || echo not ccache
not ccache$ CCACHE_COMPILER=nonexistent gcc --version &>/dev/null && echo not ccache || echo ccache
ccache
$ CCACHE_COMPILER=nonexistent /usr/bin/gcc --version &>/dev/null && echo not ccache || echo ccache
not ccache |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Andrej730
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is no official way to do that, but here are two hacky ways I can think of: