Fix Building

This commit is contained in:
Thomas A 2022-07-03 10:40:29 -07:00
parent 443d929eb3
commit 3a3d668e11
2 changed files with 8 additions and 2 deletions

View File

@ -3,7 +3,10 @@ project(libcxxabi)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -nostdinc -std=c++11")
set(CMAKE_SHARED_LINKER_FLAGS "-nostdlib")
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/../libcxx/include)
include_directories(BEFORE
${CMAKE_CURRENT_SOURCE_DIR}/../libcxx/include
${CMAKE_CURRENT_SOURCE_DIR}/../libcxx
)
add_definitions(-D__DARWIN_NON_CANCELABLE=1 -D_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION=1)
@ -19,7 +22,6 @@ set(cxxabi_sources
#src/cxa_noexception.cpp
src/cxa_personality.cpp
src/cxa_thread_atexit.cpp
src/cxa_unexpected.cpp
src/cxa_vector.cpp
src/cxa_virtual.cpp
src/fallback_malloc.cpp

View File

@ -22,12 +22,16 @@ namespace __cxxabiv1 {
using Dtor = void(*)(void*);
extern "C"
#ifdef DARLING
int (*__cxa_thread_atexit_impl)(Dtor, void*, void*) = nullptr;
#else // !DARLING
#ifndef HAVE___CXA_THREAD_ATEXIT_IMPL
// A weak symbol is used to detect this function's presence in the C library
// at runtime, even if libc++ is built against an older libc
_LIBCXXABI_WEAK
#endif
int __cxa_thread_atexit_impl(Dtor, void*, void*);
#endif // DARLING
#ifndef HAVE___CXA_THREAD_ATEXIT_IMPL