[libcxxabi] Build all of libcxxabi with _LIBCPP_BUILDING_LIBRARY defined
Various definitions from libcxx need to be set in the same way as if building libcxx itself. Differential Revision: https://reviews.llvm.org/D90476
This commit is contained in:
@@ -282,6 +282,10 @@ endif()
|
||||
# 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)
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#define _LIBCPP_BUILDING_LIBRARY
|
||||
#include <new>
|
||||
#include <exception>
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
// This file implements the new and delete operators.
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#define _LIBCPP_BUILDING_LIBRARY
|
||||
#include "__cxxabi_config.h"
|
||||
#include <new>
|
||||
#include <cstdlib>
|
||||
|
||||
Reference in New Issue
Block a user