[libcxx-commits] [PATCH] D62060: Make libc++'s libc++abi discovery work in the monorepo layout
Nico Weber via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri May 17 05:43:41 PDT 2019
thakis created this revision.
thakis added a reviewer: EricWF.
Herald added subscribers: christof, mgorny.
The code currently checks for the presence of cxxabi.h in various
places to decide if libc++abi is getting built. In the monorepo layout,
that file is always present but libc++abi is only being built if it's
in LLVM_ENABLE_PROJECTS. So check LLVM_ENABLE_PROJECTS in monorepo
builds instead of checking for the presence of that file.
https://reviews.llvm.org/D62060
Files:
libcxx/CMakeLists.txt
Index: libcxx/CMakeLists.txt
===================================================================
--- libcxx/CMakeLists.txt
+++ libcxx/CMakeLists.txt
@@ -145,11 +145,24 @@
NO_DEFAULT_PATH
NO_CMAKE_FIND_ROOT_PATH
)
+ # Check if a libcxxabi checkout is present. In the monorepo layout, the code
+ # is always there and LLVM_ENABLE_PROJECTS controls if it's built.
+ # In the old layout, libcxxabi is built if it merely exists.
+ if (NOT LIBCXX_STANDALONE_BUILD AND
+ (LLVM_ENABLE_PROJECTS_USED OR NOT LLVM_ENABLE_PROJECTS STREQUAL ""))
+ if ("libcxxabi" IN_LIST LLVM_ENABLE_PROJECTS)
+ set(LIBCXX_HAVE_LIBCXXABI_CHECKOUT_INTERNAL TRUE)
+ endif()
+ else()
+ if (IS_DIRECTORY "${LIBCXX_LIBCXXABI_INCLUDES_INTERNAL}")
+ set(LIBCXX_HAVE_LIBCXXABI_CHECKOUT_INTERNAL TRUE)
+ endif()
+ endif()
if (LIBCXX_TARGETING_MSVC)
# FIXME: Figure out how to configure the ABI library on Windows.
set(LIBCXX_CXX_ABI_LIBNAME "vcruntime")
elseif ((NOT LIBCXX_STANDALONE_BUILD OR HAVE_LIBCXXABI) AND
- IS_DIRECTORY "${LIBCXX_LIBCXXABI_INCLUDES_INTERNAL}")
+ LIBCXX_HAVE_LIBCXXABI_CHECKOUT_INTERNAL)
set(LIBCXX_CXX_ABI_LIBNAME "libcxxabi")
set(LIBCXX_CXX_ABI_INCLUDE_PATHS "${LIBCXX_LIBCXXABI_INCLUDES_INTERNAL}")
set(LIBCXX_CXX_ABI_INTREE 1)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62060.200022.patch
Type: text/x-patch
Size: 1313 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20190517/f2592ec5/attachment-0001.bin>
More information about the libcxx-commits
mailing list