[libcxx-commits] [PATCH] D90476: [libcxxabi] Build all of libcxxabi with _LIBCPP_BUILDING_LIBRARY defined
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Nov 2 23:33:31 PST 2020
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG9c30bafd59bf: [libcxxabi] Build all of libcxxabi with _LIBCPP_BUILDING_LIBRARY defined (authored by mstorsjo).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90476/new/
https://reviews.llvm.org/D90476
Files:
libcxxabi/CMakeLists.txt
libcxxabi/src/fallback_malloc.cpp
libcxxabi/src/stdlib_exception.cpp
libcxxabi/src/stdlib_new_delete.cpp
Index: libcxxabi/src/stdlib_new_delete.cpp
===================================================================
--- libcxxabi/src/stdlib_new_delete.cpp
+++ libcxxabi/src/stdlib_new_delete.cpp
@@ -8,7 +8,6 @@
// This file implements the new and delete operators.
//===----------------------------------------------------------------------===//
-#define _LIBCPP_BUILDING_LIBRARY
#include "__cxxabi_config.h"
#include <new>
#include <cstdlib>
Index: libcxxabi/src/stdlib_exception.cpp
===================================================================
--- libcxxabi/src/stdlib_exception.cpp
+++ libcxxabi/src/stdlib_exception.cpp
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#define _LIBCPP_BUILDING_LIBRARY
#include <new>
#include <exception>
Index: libcxxabi/src/fallback_malloc.cpp
===================================================================
--- libcxxabi/src/fallback_malloc.cpp
+++ libcxxabi/src/fallback_malloc.cpp
@@ -6,9 +6,6 @@
//
//===----------------------------------------------------------------------===//
-// Define _LIBCPP_BUILDING_LIBRARY to ensure _LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION
-// is only defined when libc aligned allocation is not available.
-#define _LIBCPP_BUILDING_LIBRARY
#include "fallback_malloc.h"
#include <__threading_support>
Index: libcxxabi/CMakeLists.txt
===================================================================
--- libcxxabi/CMakeLists.txt
+++ libcxxabi/CMakeLists.txt
@@ -282,6 +282,10 @@
# library.
add_definitions(-D_LIBCXXABI_BUILDING_LIBRARY)
+# libcxxabi needs to, for various reasons, include the libcpp headers as if
+# it is being built as part of libcxx.
+add_definitions(-D_LIBCPP_BUILDING_LIBRARY)
+
# Disable DLL annotations on Windows for static builds.
if (WIN32 AND LIBCXXABI_ENABLE_STATIC AND NOT LIBCXXABI_ENABLE_SHARED)
add_definitions(-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90476.302472.patch
Type: text/x-patch
Size: 1952 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20201103/5c56b1ed/attachment-0001.bin>
More information about the libcxx-commits
mailing list