This is an archive of the discontinued LLVM Phabricator instance.

[libcxxabi] PR26778 Fix tests when CXX="ccache clang++"
AbandonedPublic

Authored by hintonda on Feb 29 2016, 1:50 PM.

Details

Reviewers
mclow.lists
Summary

If you use ccache to build libcxxabi by setting CXX="ccache
clang++", check-libcxxabi will fail since LIBCXXABI_COMPILER will be
set to "ccache".

We can't just include CMAKE_CXX_COMPILER_ARG1 because of a python
parsing issue, so the best we can do right now is to use
CMAKE_CXX_COMPILER_ARG1 if it exists, and CMAKE_CXX_COMPILER if it
doesn't.

Diff Detail

Event Timeline

hintonda updated this revision to Diff 49420.Feb 29 2016, 1:50 PM
hintonda retitled this revision from to [libcxxabi] PR26778 Fix tests when CXX="ccache clang++".
hintonda updated this object.
hintonda added a reviewer: mclow.lists.
hintonda added a subscriber: cfe-commits.
hintonda abandoned this revision.Apr 17 2016, 12:04 PM

If *_COMPILER_ARG1 is set, then it shall be the compiler, and the value for CMAKE_<LANG>_COMPILER may be ccache, but could also be something else, e.g., distcc, etc. Therefore, I don't see a clean way to check it.

However, newer versions of cmake have abandoned the *_COMPILER_ARG1 solutions and set CMAKE_<LANG>_COMPILER to the real compiler and use a new variable, CMAKE_<LANG>_COMPILER_LAUNCHER for ccache, distcc, etc..

So the solution is just to upgrade to the newest version of cmake if you want to use ccache, etc...