summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2014-04-14 22:10:49 +0000
committerDan Albert <danalbert@google.com>2014-04-14 22:10:49 +0000
commit685b686397762543524a8496c4901332588e7349 (patch)
treed0ff43b1b6ea69b9eb4faaecc05e559ef5e77c05
parentfa2203904bdca85115bf2fcb9bd70150dffa9bbe (diff)
downloadlibcxxabi_35a-685b686397762543524a8496c4901332588e7349.tar.gz
Revert "Gets libcxxabi building for Android"
This reverts commit fa2203904bdca85115bf2fcb9bd70150dffa9bbe. Change-Id: Ifbe705df19347ea11b858ec5e0a4b61bc2f922c5
-rw-r--r--Android.mk80
-rw-r--r--include/unwind.h2
-rw-r--r--src/Unwind/AddressSpace.hpp2
-rw-r--r--src/Unwind/UnwindCursor.hpp3
-rw-r--r--src/Unwind/config.h14
-rw-r--r--src/cxa_exception.cpp6
-rw-r--r--src/cxa_personality.cpp2
7 files changed, 7 insertions, 102 deletions
diff --git a/Android.mk b/Android.mk
deleted file mode 100644
index ea13f37..0000000
--- a/Android.mk
+++ /dev/null
@@ -1,80 +0,0 @@
-#
-# Copyright (C) 2014 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-LIBCXXABI_SRC_FILES := \
- src/abort_message.cpp \
- src/cxa_aux_runtime.cpp \
- src/cxa_default_handlers.cpp \
- src/cxa_demangle.cpp \
- src/cxa_exception.cpp \
- src/cxa_exception_storage.cpp \
- src/cxa_guard.cpp \
- src/cxa_handlers.cpp \
- src/cxa_new_delete.cpp \
- src/cxa_personality.cpp \
- src/cxa_unexpected.cpp \
- src/cxa_vector.cpp \
- src/cxa_virtual.cpp \
- src/exception.cpp \
- src/fallback_malloc.ipp \
- src/private_typeinfo.cpp \
- src/stdexcept.cpp \
- src/typeinfo.cpp \
- src/Unwind/libunwind.cpp \
- src/Unwind/Unwind-sjlj.c \
- src/Unwind/UnwindLevel1-gcc-ext.c \
- src/Unwind/UnwindLevel1.c \
- src/Unwind/UnwindRegistersSave.S \
-
-ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),x86 x86_64))
-LIBCXXABI_SRC_FILES += src/Unwind/UnwindRegistersRestore.S
-endif
-
-LIBCXXABI_CFLAGS := \
- -I$(LOCAL_PATH)/include/ \
-
-LIBCXXABI_RTTI_FLAG := -frtti
-LIBCXXABI_CPPFLAGS := \
- -Iexternal/libcxx/include /\
- --std=c++11 \
- -fexceptions \
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := libcxxabi
-LOCAL_CLANG := true
-LOCAL_SRC_FILES := $(LIBCXXABI_SRC_FILES)
-LOCAL_CFLAGS := $(LIBCXXABI_CFLAGS)
-LOCAL_CPPFLAGS := $(LIBCXXABI_CPPFLAGS)
-LOCAL_RTTI_FLAG := $(LIBCXXABI_RTTI_FLAG)
-
-ifneq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),arm arm64))
-LOCAL_SHARED_LIBRARIES := libdl
-endif
-
-LOCAL_SYSTEM_SHARED_LIBRARIES := libc
-include $(BUILD_SHARED_LIBRARY)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := libcxxabi
-LOCAL_CLANG := true
-LOCAL_SRC_FILES := $(LIBCXXABI_SRC_FILES)
-LOCAL_CFLAGS := $(LIBCXXABI_CFLAGS)
-LOCAL_CPPFLAGS := $(LIBCXXABI_CPPFLAGS)
-LOCAL_LDFLAGS := -lpthread
-LOCAL_RTTI_FLAG := $(LIBCXXABI_RTTI_FLAG)
-include $(BUILD_HOST_SHARED_LIBRARY)
diff --git a/include/unwind.h b/include/unwind.h
index 50e2d4b..c5acd93 100644
--- a/include/unwind.h
+++ b/include/unwind.h
@@ -83,7 +83,7 @@ extern "C" {
//
// The following are the base functions documented by the C++ ABI
//
-#if _LIBUNWIND_BUILD_SJLJ_APIS
+#if __arm__
extern _Unwind_Reason_Code
_Unwind_SjLj_RaiseException(struct _Unwind_Exception *exception_object);
extern void _Unwind_SjLj_Resume(struct _Unwind_Exception *exception_object);
diff --git a/src/Unwind/AddressSpace.hpp b/src/Unwind/AddressSpace.hpp
index ff8c8b0..fafee04 100644
--- a/src/Unwind/AddressSpace.hpp
+++ b/src/Unwind/AddressSpace.hpp
@@ -298,7 +298,7 @@ inline bool LocalAddressSpace::findOtherFDE(pint_t targetAddr, pint_t &fde) {
inline bool LocalAddressSpace::findFunctionName(pint_t addr, char *buf,
size_t bufLen,
unw_word_t *offset) {
- Dl_info dyldInfo;
+ dl_info dyldInfo;
if (dladdr((void *)addr, &dyldInfo)) {
if (dyldInfo.dli_sname != NULL) {
strlcpy(buf, dyldInfo.dli_sname, bufLen);
diff --git a/src/Unwind/UnwindCursor.hpp b/src/Unwind/UnwindCursor.hpp
index 035e471..235922f 100644
--- a/src/Unwind/UnwindCursor.hpp
+++ b/src/Unwind/UnwindCursor.hpp
@@ -151,12 +151,10 @@ void DwarfFDECache<A>::removeAllIn(pint_t mh) {
_LIBUNWIND_LOG_NON_ZERO(::pthread_rwlock_unlock(&_lock));
}
-#if __APPLE__
template <typename A>
void DwarfFDECache<A>::dyldUnloadHook(const struct mach_header *mh, intptr_t ) {
removeAllIn((pint_t) mh);
}
-#endif
template <typename A>
void DwarfFDECache<A>::iterateCacheEntries(void (*func)(
@@ -365,7 +363,6 @@ private:
class _LIBUNWIND_HIDDEN AbstractUnwindCursor {
public:
- virtual ~AbstractUnwindCursor() {}
virtual bool validReg(int) = 0;
virtual unw_word_t getReg(int) = 0;
virtual void setReg(int, unw_word_t) = 0;
diff --git a/src/Unwind/config.h b/src/Unwind/config.h
index 5aaadaf..7d7e6bf 100644
--- a/src/Unwind/config.h
+++ b/src/Unwind/config.h
@@ -43,7 +43,7 @@
#define _LIBUNWIND_SUPPORT_FRAME_APIS (__i386__ || __x86_64__)
#define _LIBUNWIND_EXPORT __attribute__((visibility("default")))
#define _LIBUNWIND_HIDDEN __attribute__((visibility("hidden")))
- #define _LIBUNWIND_LOG(msg, ...) fprintf(stderr, "libunwind: " msg, __VA_ARGS__)
+ #define _LIBUNWIND_LOG(msg, ...) fprintf(stderr, "libuwind: " msg, __VA_ARGS__)
#define _LIBUNWIND_ABORT(msg) __assert_rtn(__func__, __FILE__, __LINE__, msg)
#if FOR_DYLD
@@ -56,18 +56,6 @@
#define _LIBUNWIND_SUPPORT_DWARF_INDEX 0
#endif
-#elif defined(__BIONIC__)
- #define _LIBUNWIND_BUILD_ZERO_COST_APIS (__i386__ || __x86_64__ || __arm64__ || __arm__)
- #define _LIBUNWIND_BUILD_SJLJ_APIS 0
- #define _LIBUNWIND_SUPPORT_FRAME_APIS (__i386__ || __x86_64__)
- #define _LIBUNWIND_EXPORT __attribute__((visibility("default")))
- #define _LIBUNWIND_HIDDEN __attribute__((visibility("hidden")))
- #define _LIBUNWIND_LOG(msg, ...) fprintf(stderr, "libunwind: " msg, __VA_ARGS__)
- #define _LIBUNWIND_ABORT(msg) __assert2(__FILE__, __LINE__, __func__, msg)
-
- #define _LIBUNWIND_SUPPORT_COMPACT_UNWIND 1
- #define _LIBUNWIND_SUPPORT_DWARF_UNWIND 1
- #define _LIBUNWIND_SUPPORT_DWARF_INDEX 0
#else
// #define _LIBUNWIND_BUILD_ZERO_COST_APIS
// #define _LIBUNWIND_BUILD_SJLJ_APIS
diff --git a/src/cxa_exception.cpp b/src/cxa_exception.cpp
index 787d8a8..744dddd 100644
--- a/src/cxa_exception.cpp
+++ b/src/cxa_exception.cpp
@@ -232,7 +232,7 @@ __cxa_throw(void* thrown_object, std::type_info* tinfo, void (*dest)(void*))
globals->uncaughtExceptions += 1; // Not atomically, since globals are thread-local
exception_header->unwindHeader.exception_cleanup = exception_cleanup_func;
-#if _LIBUNWIND_BUILD_SJLJ_APIS
+#if __arm__
_Unwind_SjLj_RaiseException(&exception_header->unwindHeader);
#else
_Unwind_RaiseException(&exception_header->unwindHeader);
@@ -465,7 +465,7 @@ __cxa_rethrow()
// nothing
globals->caughtExceptions = 0;
}
-#if _LIBUNWIND_BUILD_SJLJ_APIS
+#if __arm__
_Unwind_SjLj_RaiseException(&exception_header->unwindHeader);
#else
_Unwind_RaiseException(&exception_header->unwindHeader);
@@ -594,7 +594,7 @@ __cxa_rethrow_primary_exception(void* thrown_object)
setDependentExceptionClass(&dep_exception_header->unwindHeader);
__cxa_get_globals()->uncaughtExceptions += 1;
dep_exception_header->unwindHeader.exception_cleanup = dependent_exception_cleanup;
-#if _LIBUNWIND_BUILD_SJLJ_APIS
+#if __arm__
_Unwind_SjLj_RaiseException(&dep_exception_header->unwindHeader);
#else
_Unwind_RaiseException(&dep_exception_header->unwindHeader);
diff --git a/src/cxa_personality.cpp b/src/cxa_personality.cpp
index 32a3127..81104b8 100644
--- a/src/cxa_personality.cpp
+++ b/src/cxa_personality.cpp
@@ -838,7 +838,7 @@ _UA_CLEANUP_PHASE
*/
_Unwind_Reason_Code
-#if _LIBUNWIND_BUILD_SJLJ_APIS
+#if __arm__
__gxx_personality_sj0
#else
__gxx_personality_v0