]> git.ipfire.org Git - thirdparty/ccache.git/commit
Only accept -f(no-)color-diagnostics for Clang
authorJoel Rosdahl <joel@rosdahl.net>
Wed, 30 Dec 2020 20:22:26 +0000 (21:22 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Wed, 30 Dec 2020 20:52:45 +0000 (21:52 +0100)
commit61ce8c44c5b1da0be7a8d10c014f1a85b7967433
tree38a00bf840ab7280bc4f8e0aa437fbd69c835cf4
parent76eb7f4c46e876db07bbc8fa850b7d84a480c5ea
Only accept -f(no-)color-diagnostics for Clang

If a non-Clang compiler gets -f(no-)color-diagnostics then bail out and
just execute the compiler. The reason is that we don't include
-f(no-)color-diagnostics in the hash so there can be a false cache hit
in the following scenario:

  1. ccache gcc -c example.c                      # adds a cache entry
  2. ccache gcc -c example.c -fcolor-diagnostics  # unexpectedly succeeds

Closes: #740.
src/argprocessing.cpp
test/suites/color_diagnostics.bash