diff options
Diffstat (limited to 'libunwindstack/Android.bp')
-rw-r--r-- | libunwindstack/Android.bp | 76 |
1 files changed, 47 insertions, 29 deletions
diff --git a/libunwindstack/Android.bp b/libunwindstack/Android.bp index 36449ebb8..9afc9a326 100644 --- a/libunwindstack/Android.bp +++ b/libunwindstack/Android.bp @@ -35,20 +35,13 @@ cc_defaults { }, } -cc_library { - name: "libunwindstack", - vendor_available: true, - recovery_available: true, - vndk: { - enabled: true, - support_system_process: true, - }, +cc_defaults { + name: "libunwindstack_defaults", defaults: ["libunwindstack_flags"], export_include_dirs: ["include"], srcs: [ "ArmExidx.cpp", - "DexFile.cpp", "DexFiles.cpp", "DwarfCfa.cpp", "DwarfEhFrameWithHdr.cpp", @@ -77,7 +70,6 @@ cc_library { ], cflags: [ - "-DDEXFILE_SUPPORT", "-Wexit-time-destructors", ], @@ -89,24 +81,6 @@ cc_library { "-g", ], }, - vendor: { - cflags: ["-UDEXFILE_SUPPORT"], - exclude_srcs: [ - "DexFile.cpp", - ], - exclude_shared_libs: [ - "libdexfile_support", - ], - }, - recovery: { - cflags: ["-UDEXFILE_SUPPORT"], - exclude_srcs: [ - "DexFile.cpp", - ], - exclude_shared_libs: [ - "libdexfile_support", - ], - }, }, arch: { @@ -124,12 +98,56 @@ cc_library { shared_libs: [ "libbase", - "libdexfile_support", "liblog", "liblzma", ], } +cc_library { + name: "libunwindstack", + vendor_available: true, + recovery_available: true, + vndk: { + enabled: true, + support_system_process: true, + }, + defaults: ["libunwindstack_defaults"], + + srcs: ["DexFile.cpp"], + cflags: ["-DDEXFILE_SUPPORT"], + shared_libs: ["libdexfile_support"], + + target: { + vendor: { + cflags: ["-UDEXFILE_SUPPORT"], + exclude_srcs: ["DexFile.cpp"], + exclude_shared_libs: ["libdexfile_support"], + }, + recovery: { + cflags: ["-UDEXFILE_SUPPORT"], + exclude_srcs: ["DexFile.cpp"], + exclude_shared_libs: ["libdexfile_support"], + }, + }, +} + +// Static library without DEX support to avoid dependencies on the ART APEX. +cc_library_static { + name: "libunwindstack_no_dex", + recovery_available: true, + defaults: ["libunwindstack_defaults"], + + visibility: [ + "//system/core/debuggerd", + "//system/core/init", + "//system/core/libbacktrace", + ], + apex_available: [ + "//apex_available:platform", + "com.android.runtime", + ], +} + //------------------------------------------------------------------------- // Unit Tests //------------------------------------------------------------------------- |