]> git.ipfire.org Git - thirdparty/ccache.git/commit
Only reject -f(no-)color-diagnostics for known GCC compiler
authorJoel Rosdahl <joel@rosdahl.net>
Sat, 13 Mar 2021 12:26:03 +0000 (13:26 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Sat, 13 Mar 2021 12:40:41 +0000 (13:40 +0100)
commit97a40af49f56e4be2db5e4318d8131e937bd5598
tree23448f97436143f927a552ce3f88857a3f899e0a
parent3c96cee611b5cb678c8574663f726dc2dd24366d
Only reject -f(no-)color-diagnostics for known GCC compiler

61ce8c44 made it so that ccache rejects -f(no-)color-diagnostics early
for non-Clang compilers. This was needed to avoid false cache hits for
the GCC case, but it had the side effect of rejecting
-fcolor-diagnostics for unknown compilers as well, such as for a
compiler named c++ that in reality is clang++ (which actually accepts
-f(no-)color-diagnostics).

Fix this by simply doing the special case for GCC instead of non-Clang.
This is OK since the speculative handling of color diagnostics options
is only done for GCC and Clang, not for other compiler types.

Fixes #806.
src/argprocessing.cpp
test/suites/color_diagnostics.bash