Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Certain vendors (e.g. Apple, HPE Cray) have the bad habit of providing a single compiler entrypoint (
clang
in the case of Apple's XCode), and a bunch of symlinks to that one entrypoint for the various languages (e.g.cc
andc++
both link toclang
). That is fine, however inside the shared entrypoint the code is taking cases depending on which symlink was used to invoke it. In the case of XCode, invokingclang
throughcxx
will activate C++-mode, whereas invoking it throughcc
(or simply using the shared entrypoint directly) will activate C-mode, which will not link against the standard C++ library:What this all means is that we need to avoid following symlinks on compiler executables.
If there was a fundamental reason why we were doing this in this file, my case would also be solved if we changed the fuzzy matching for
*/cc
to explicitly match only/usr/bin/cc
.This change also makes sure ccache will be applied on the propagated value of
CC
/CXX
, if it exists.