[PATCH] D97379: [libcxxabi] Fewer assumptions about path from libcxx to libcxxabi

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 26 06:10:43 PST 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG72b18a86e11e: [libcxxabi] Fewer assumptions about path from libcxx to libcxxabi (authored by thakis).
Herald added projects: libc++abi, LLVM.
Herald added a reviewer: libc++abi.
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D97379?vs=326074&id=326674#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97379/new/

https://reviews.llvm.org/D97379

Files:
  libcxxabi/src/CMakeLists.txt
  libcxxabi/src/stdlib_stdexcept.cpp
  llvm/utils/gn/secondary/libcxxabi/src/BUILD.gn


Index: llvm/utils/gn/secondary/libcxxabi/src/BUILD.gn
===================================================================
--- llvm/utils/gn/secondary/libcxxabi/src/BUILD.gn
+++ llvm/utils/gn/secondary/libcxxabi/src/BUILD.gn
@@ -62,6 +62,9 @@
   include_dirs = [
     "//libcxxabi/include",
     "//libcxx/include",
+
+    # stdlib_stdexcept.cpp depends on libc++ internals.
+    "//libcxx",
   ]
   cflags_cc = [ "-nostdinc++" ]
   defines = [ "_LIBCXXABI_BUILDING_LIBRARY" ]
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.326674.patch
Type: text/x-patch
Size: 1622 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210226/bd06f6d1/attachment.bin>


More information about the llvm-commits mailing list