diff options
| -rw-r--r-- | libartbase/Android.bp | 10 | ||||
| -rw-r--r-- | libdexfile/Android.bp | 10 | ||||
| -rw-r--r-- | libprofile/Android.bp | 10 | ||||
| -rw-r--r-- | runtime/Android.bp | 44 |
4 files changed, 50 insertions, 24 deletions
diff --git a/libartbase/Android.bp b/libartbase/Android.bp index d8cf12366b..07286693da 100644 --- a/libartbase/Android.bp +++ b/libartbase/Android.bp @@ -165,17 +165,15 @@ gensrcs { art_cc_library { name: "libartbase", - defaults: ["libartbase_defaults"], + defaults: [ + "libartbase_defaults", + "libart_nativeunwind_defaults", + ], visibility: [ // TODO(b/133140750): Clean this up. "//packages/modules/NetworkStack/tests:__subpackages__", ], - // Leave the symbols in the shared library so that stack unwinders can - // produce meaningful name resolution. - strip: { - keep_symbols: true, - }, shared_libs: [ "libbase", "libziparchive", diff --git a/libdexfile/Android.bp b/libdexfile/Android.bp index a08f89faa6..2249d0a388 100644 --- a/libdexfile/Android.bp +++ b/libdexfile/Android.bp @@ -140,12 +140,10 @@ gensrcs { art_cc_library { name: "libdexfile", - defaults: ["libdexfile_defaults"], - // Leave the symbols in the shared library so that stack unwinders can - // produce meaningful name resolution. - strip: { - keep_symbols: true, - }, + defaults: [ + "libdexfile_defaults", + "libart_nativeunwind_defaults", + ], target: { android: { shared_libs: [ diff --git a/libprofile/Android.bp b/libprofile/Android.bp index 11b6576a21..1742a978f6 100644 --- a/libprofile/Android.bp +++ b/libprofile/Android.bp @@ -97,12 +97,10 @@ cc_defaults { art_cc_library { name: "libprofile", - defaults: ["libprofile_defaults"], - // Leave the symbols in the shared library so that stack unwinders can - // produce meaningful name resolution. - strip: { - keep_symbols: true, - }, + defaults: [ + "libprofile_defaults", + "libart_nativeunwind_defaults", + ], shared_libs: [ "libbase", "libziparchive", diff --git a/runtime/Android.bp b/runtime/Android.bp index 0546c69b41..01e2dc6260 100644 --- a/runtime/Android.bp +++ b/runtime/Android.bp @@ -23,6 +23,40 @@ JIT_DEBUG_REGISTER_CODE_LDFLAGS = [ "-Wl,--keep-unique,__dex_debug_register_code", ] +// These are defaults for native shared libaries that are expected to be +// in stack traces often. +libart_cc_defaults { + name: "libart_nativeunwind_defaults", + arch: { + arm: { + // Arm 32 bit does not produce complete exidx unwind information + // so keep the .debug_frame which is relatively small and does + // include needed unwind information. + // See b/132992102 and b/145790995 for details. + strip: { + keep_symbols_and_debug_frame: true, + }, + }, + // For all other architectures, leave the symbols in the shared library + // so that stack unwinders can produce meaningful name resolution. + arm64: { + strip: { + keep_symbols: true, + }, + }, + x86: { + strip: { + keep_symbols: true, + }, + }, + x86_64: { + strip: { + keep_symbols: true, + }, + }, + }, +} + libart_cc_defaults { name: "libart_defaults", defaults: ["art_defaults"], @@ -517,12 +551,10 @@ gensrcs { art_cc_library { name: "libart", - defaults: ["libart_defaults"], - // Leave the symbols in the shared library so that stack unwinders can - // produce meaningful name resolution. - strip: { - keep_symbols: true, - }, + defaults: [ + "libart_defaults", + "libart_nativeunwind_defaults", + ], whole_static_libs: [ ], static_libs: [ |