[libc++] Attempt to fix the 'runtimes' build
authorLouis Dionne <ldionne@apple.com>
Thu, 2 Apr 2020 16:08:10 +0000 (12:08 -0400)
committerLouis Dionne <ldionne@apple.com>
Thu, 2 Apr 2020 16:14:13 +0000 (12:14 -0400)
The 'runtimes' build started failing because libc++ stopped using the
in-tree libc++abi when HAVE_CXXABI is set after 61e89737c. This commit
tries to bring back the old behavior when HAVE_CXXABI is set in order
to fix CIs.

However, we really need to sit down and discuss what ways of building
libc++ are supported and formalize them, because having the libc++ build
system branch on basically random variables in some CMake cache somewhere
is not a viable path forward.

libcxx/cmake/Modules/HandleLibCXXABI.cmake

index 2cdf822..a62efc0 100644 (file)
@@ -104,7 +104,7 @@ if ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libstdc++" OR
 elseif ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libcxxabi")
   set(LIBCXX_CXX_ABI_INCLUDE_PATHS "${LIBCXX_SOURCE_DIR}/../libcxxabi/include")
 
-  if(LIBCXX_STANDALONE_BUILD)
+  if(LIBCXX_STANDALONE_BUILD AND NOT (LIBCXX_CXX_ABI_INTREE OR HAVE_LIBCXXABI))
     set(shared c++abi)
     set(static c++abi)
   else()