diff options
author | Dan Albert <danalbert@google.com> | 2014-05-16 02:16:16 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-05-16 02:16:16 +0000 |
commit | 7caf3dc7800cd1b6f893b62d91d454bbcb42838e (patch) | |
tree | 82eab3afae57163bbf1af0826bb3dabd86b1f5c6 | |
parent | b9d834bf13354e369d1e0dd96201e9fe3a952e03 (diff) | |
parent | 86f59b9a49bfc263bdc242e194e9550f82c3b21a (diff) | |
download | libcxxrt-7caf3dc7800cd1b6f893b62d91d454bbcb42838e.tar.gz |
am 86f59b9a: Removes libdl code for target builds
* commit '86f59b9a49bfc263bdc242e194e9550f82c3b21a':
Removes libdl code for target builds
-rw-r--r-- | Android.mk | 2 | ||||
-rw-r--r-- | src/exception.cc | 4 |
2 files changed, 5 insertions, 1 deletions
@@ -46,7 +46,7 @@ LOCAL_CLANG := true LOCAL_CPP_EXTENSION := .cc LOCAL_SRC_FILES := $(LIBCXXRT_SRC_FILES) LOCAL_CFLAGS := $(LIBCXXRT_CFLAGS) -LOCAL_CPPFLAGS := $(LIBCXXRT_CPPFLAGS) +LOCAL_CPPFLAGS := $(LIBCXXRT_CPPFLAGS) -DNO_LIBDL LOCAL_RTTI_FLAG := $(LIBCXXRT_RTTI_FLAG) LOCAL_LDFLAGS := -nodefaultlibs LOCAL_SYSTEM_SHARED_LIBRARIES := libc diff --git a/src/exception.cc b/src/exception.cc index ed5ad2b..663a4e8 100644 --- a/src/exception.cc +++ b/src/exception.cc @@ -642,6 +642,7 @@ void __cxa_free_dependent_exception(void *thrown_exception) free_exception(reinterpret_cast<char*>(ex)); } +#ifndef NO_LIBDL /** * Callback function used with _Unwind_Backtrace(). * @@ -666,6 +667,7 @@ static _Unwind_Reason_Code trace(struct _Unwind_Context *context, void *c) } return _URC_CONTINUE_UNWIND; } +#endif /** * Report a failure that occurred when attempting to throw an exception. @@ -722,7 +724,9 @@ static void report_failure(_Unwind_Reason_Code err, __cxa_exception *thrown_exce if (status == 0) { free(demangled); } // Print a back trace if no handler is found. // TODO: Make this optional +#ifndef NO_LIBDL _Unwind_Backtrace(trace, 0); +#endif // Just abort. No need to call std::terminate for the second time abort(); |