summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2020-04-28 20:24:32 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2020-04-28 20:24:32 +0000
commit9f3a775bd8ff2f2a497ca247fb5f5d6a799d0676 (patch)
tree83ef20c91a76e1349a30190438e49ad3f05169b1
parent66efbb05b48335b5eb55d6210a8862bfaffef6f1 (diff)
parenta13dc9a5c69d05d8f285b0ab52e7b1ebadf4dc50 (diff)
downloadlibcxxabi-q_tzdata_aml_295500002.tar.gz
Change-Id: I268c4d7b7bf0b91ebec67c6f729f087564c7ba89
-rw-r--r--Android.bp60
-rw-r--r--src/cxa_default_handlers.cpp4
2 files changed, 23 insertions, 41 deletions
diff --git a/Android.bp b/Android.bp
index cb14814..2a84000 100644
--- a/Android.bp
+++ b/Android.bp
@@ -14,44 +14,11 @@
// limitations under the License.
//
-cc_defaults {
- name: "libc++abi_defaults",
- vendor_available: true,
- recovery_available: true,
- native_bridge_supported: true,
- include_dirs: ["external/libcxx/include"],
- local_include_dirs: ["include"],
- export_include_dirs: ["include"],
- cflags: [
- "-Wall",
- "-Werror",
- ],
- cppflags: [
- "-std=c++14",
- "-fexceptions",
- "-Wextra",
- "-Wno-unused-function",
- "-Wno-implicit-fallthrough",
- // src/cxa_demangle.cpp:2591 -Wimplicit-fallthrough
- ],
- sanitize: {
- never: true,
- },
- stl: "none",
- rtti: true,
-}
-
-cc_library_static {
- name: "libc++demangle",
- defaults: ["libc++abi_defaults"],
- host_supported: false,
- srcs: ["src/cxa_demangle.cpp"],
-}
-
cc_library_static {
name: "libc++abi",
- defaults: ["libc++abi_defaults"],
host_supported: true,
+ vendor_available: true,
+ recovery_available: true,
srcs: [
"src/abort_message.cpp",
"src/cxa_aux_runtime.cpp",
@@ -73,6 +40,26 @@ cc_library_static {
"src/stdlib_stdexcept.cpp",
"src/stdlib_typeinfo.cpp",
],
+ include_dirs: ["external/libcxx/include"],
+ local_include_dirs: ["include"],
+ export_include_dirs: ["include"],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+ cppflags: [
+ "-std=c++14",
+ "-fexceptions",
+ "-Wextra",
+ "-Wno-unused-function",
+ "-Wno-implicit-fallthrough",
+ // src/cxa_demangle.cpp:2591 -Wimplicit-fallthrough
+ ],
+ sanitize: {
+ never: true,
+ },
+ stl: "none",
+ rtti: true,
arch: {
arm: {
include_dirs: ["external/libunwind_llvm/include"],
@@ -97,8 +84,6 @@ cc_library_static {
target: {
android: {
cppflags: ["-DHAVE___CXA_THREAD_ATEXIT_IMPL"],
- // Packaged in libc++demangle for Android to reduce bloat.
- exclude_srcs: ["src/cxa_demangle.cpp"],
},
darwin: {
// libcxxabi really doesn't like the non-LLVM assembler on Darwin
@@ -135,4 +120,5 @@ cc_library_static {
],
}
},
+
}
diff --git a/src/cxa_default_handlers.cpp b/src/cxa_default_handlers.cpp
index 3dbde8d..f00e959 100644
--- a/src/cxa_default_handlers.cpp
+++ b/src/cxa_default_handlers.cpp
@@ -45,7 +45,6 @@ static void demangling_terminate_handler()
exception_header + 1;
const __shim_type_info* thrown_type =
static_cast<const __shim_type_info*>(exception_header->exceptionType);
-#if !defined(__ANDROID__)
// Try to get demangled name of thrown_type
int status;
char buf[1024];
@@ -53,9 +52,6 @@ static void demangling_terminate_handler()
const char* name = __cxa_demangle(thrown_type->name(), buf, &len, &status);
if (status != 0)
name = thrown_type->name();
-#else
- const char* name = thrown_type->name();
-#endif
// If the uncaught exception can be caught with std::exception&
const __shim_type_info* catch_type =
static_cast<const __shim_type_info*>(&typeid(std::exception));