[libcxx-commits] [PATCH] D97379: [libcxxabi] Fewer assumptions about path from libcxx to libcxxabi
Nico Weber via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Feb 24 06:28:06 PST 2021
thakis created this revision.
thakis added reviewers: rnk, libc++.
Herald added a subscriber: mgorny.
thakis requested review of this revision.
This is useful for projects that pull in libcxx and libcxxabi and build
them using out-of-tree build files, but don't make them sibling
directories (or don't call the sibling directories libcxx and libcxxabi
for some reason).
https://reviews.llvm.org/D97379
Files:
libcxxabi/src/CMakeLists.txt
libcxxabi/src/stdlib_stdexcept.cpp
Index: libcxxabi/src/stdlib_stdexcept.cpp
===================================================================
--- libcxxabi/src/stdlib_stdexcept.cpp
+++ libcxxabi/src/stdlib_stdexcept.cpp
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include "../../libcxx/src/include/refstring.h"
#include "stdexcept"
#include "new"
#include <cstdlib>
@@ -14,6 +13,9 @@
#include <cstdint>
#include <cstddef>
+// This includes an implementation file from libc++.
+#include "src/include/refstring.h"
+
static_assert(sizeof(std::__libcpp_refstring) == sizeof(const char *), "");
namespace std // purposefully not using versioning namespace
Index: libcxxabi/src/CMakeLists.txt
===================================================================
--- libcxxabi/src/CMakeLists.txt
+++ libcxxabi/src/CMakeLists.txt
@@ -57,6 +57,9 @@
include_directories("${LIBCXXABI_LIBCXX_INCLUDES}")
+# stdlib_stdexcept.cpp depends on libc++ internals.
+include_directories("${LIBCXXABI_LIBCXX_PATH}")
+
if (LIBCXXABI_HAS_CXA_THREAD_ATEXIT_IMPL)
add_definitions(-DHAVE___CXA_THREAD_ATEXIT_IMPL)
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97379.326074.patch
Type: text/x-patch
Size: 1146 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210224/463d7a1a/attachment.bin>
More information about the libcxx-commits
mailing list