mirror of
https://github.com/darlinghq/darling-libcxxabi.git
synced 2024-11-26 21:51:04 +00:00
Fix Building
This commit is contained in:
parent
443d929eb3
commit
3a3d668e11
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user