1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

[gtest] Work around broken installs of libc++ where we don't have

a cxxabi.h in the include search paths.

This comes up when libc++ is installed with some other abi library. At
some points in time in history we have had CMake hackery to try and get
a cxxabi.h installed that would work, but there are lots of examples
lacking this. Also, the just-built tree with libc++ seems to not quite
get this right.

To let folks make progress, we can easily work around this by detecting
that the header is missing and disabling the relevant parts of gtest.
This should fix the last remainging build bot failures. While these
failures are typically indicative of a questionable install, I don't
think gtest should be the thing that surfaces those issues and I don't
want folks blocked on this.

llvm-svn: 291063
This commit is contained in:
Chandler Carruth 2017-01-05 01:41:49 +00:00
parent 4ca56e7a5d
commit ff28198b7b

View File

@ -945,7 +945,13 @@ using ::std::tuple_size;
#endif
// _LIBCPP_VERSION is defined by the libc++ library from the LLVM project.
#if defined(__GLIBCXX__) || defined(_LIBCPP_VERSION)
#if defined(__has_include)
# if __has_include(<cxxabi.h>)
# define GTEST_HAS_CXXABI_H_ 1
# else
# define GTEST_HAS_CXXABI_H_ 0
# endif
#elif defined(__GLIBCXX__) || defined(_LIBCPP_VERSION)
# define GTEST_HAS_CXXABI_H_ 1
#else
# define GTEST_HAS_CXXABI_H_ 0