platform_system_core/debuggerd/Android.bp
Martin Stjernholm bb4f2b440a Revert^2 "Use libdexfile external API in libunwindstack."
This reverts commit cacf5bf6bc.

Reason for revert: Re-apply with proper fix for VNDK visibility on marlin and sailfish.

Test: Manual repro of http://b/121110092#comment1 on reported branch
Test: atest CtsRenderscriptTestCases
Test: mmma system/core/{libunwindstack,libbacktrace}, run host gtests
Test: Make image, flash, and reboot device.
Test: Forrest cts/art/gce-all: https://android-build.googleplex.com/builds/forrest/run/L00300000240828791
Test: Forrest cts/bionic/gce-all: https://android-build.googleplex.com/builds/forrest/run/L05600000240682947 (shows 27/2958 failed, but it doesn't pass on Blackbox either: http://screen/xbjioEf6UgR)
Test: Forrest cts/renderscript/gce-all: https://android-build.googleplex.com/builds/forrest/run/L66200000240680523
Bug: 119632407
Change-Id: I601aa97eac8127e30d753405f8bc1fc4ae7f849f
2018-12-19 21:04:35 +00:00

341 lines
7.3 KiB
Text

cc_defaults {
name: "debuggerd_defaults",
cflags: [
"-Wall",
"-Wextra",
"-Werror",
"-Wno-unused-argument",
"-Wno-unused-function",
"-Wno-nullability-completeness",
"-Os",
],
local_include_dirs: ["include"],
}
cc_library_headers {
name: "libdebuggerd_common_headers",
export_include_dirs: ["common/include"],
recovery_available: true,
}
cc_library_shared {
name: "libtombstoned_client",
defaults: ["debuggerd_defaults"],
srcs: [
"tombstoned/tombstoned_client.cpp",
"util.cpp",
],
header_libs: ["libdebuggerd_common_headers"],
static_libs: [
"libasync_safe",
],
shared_libs: [
"libbase",
"libcutils",
],
export_header_lib_headers: ["libdebuggerd_common_headers"],
export_include_dirs: ["tombstoned/include"],
}
// Utility library to talk to tombstoned and get an output fd.
cc_library_static {
name: "libtombstoned_client_static",
defaults: ["debuggerd_defaults"],
recovery_available: true,
srcs: [
"tombstoned/tombstoned_client.cpp",
"util.cpp",
],
header_libs: ["libdebuggerd_common_headers"],
whole_static_libs: [
"libasync_safe",
"libcutils",
"libbase",
],
export_header_lib_headers: ["libdebuggerd_common_headers"],
export_include_dirs: ["tombstoned/include"],
}
// Core implementation, linked into libdebuggerd_handler and the dynamic linker.
cc_library_static {
name: "libdebuggerd_handler_core",
defaults: ["debuggerd_defaults"],
recovery_available: true,
srcs: ["handler/debuggerd_handler.cpp"],
header_libs: [
"libbase_headers",
"libdebuggerd_common_headers",
],
whole_static_libs: [
"libasync_safe",
"libcutils",
"libdebuggerd",
],
export_header_lib_headers: ["libdebuggerd_common_headers"],
export_include_dirs: ["include"],
}
// Implementation with a no-op fallback.
cc_library_static {
name: "libdebuggerd_handler",
defaults: ["debuggerd_defaults"],
srcs: ["handler/debuggerd_fallback_nop.cpp"],
whole_static_libs: [
"libdebuggerd_handler_core",
],
export_include_dirs: ["include"],
}
// Fallback implementation.
cc_library_static {
name: "libdebuggerd_handler_fallback",
defaults: ["debuggerd_defaults"],
recovery_available: true,
srcs: [
"handler/debuggerd_fallback.cpp",
],
whole_static_libs: [
"libdebuggerd_handler_core",
"libtombstoned_client_static",
"libasync_safe",
"libbase",
"libdebuggerd",
"libbacktrace",
"libunwindstack",
"libdexfile", // libunwindstack dependency
"libdexfile_external", // libunwindstack dependency
"libdexfile_support", // libunwindstack dependency
"liblzma",
"libcutils",
],
target: {
recovery: {
cflags: ["-DNO_LIBDEXFILE_SUPPORT"],
exclude_static_libs: [
"libartbase",
"libdexfile",
"libdexfile_external",
"libdexfile_support",
],
},
},
export_include_dirs: ["include"],
}
cc_library {
name: "libdebuggerd_client",
defaults: ["debuggerd_defaults"],
srcs: [
"client/debuggerd_client.cpp",
"util.cpp",
],
header_libs: ["libdebuggerd_common_headers"],
shared_libs: [
"libbase",
"libcutils",
],
export_header_lib_headers: ["libdebuggerd_common_headers"],
export_include_dirs: ["include"],
}
cc_library_static {
name: "libdebuggerd",
defaults: ["debuggerd_defaults"],
recovery_available: true,
srcs: [
"libdebuggerd/backtrace.cpp",
"libdebuggerd/elf_utils.cpp",
"libdebuggerd/open_files_list.cpp",
"libdebuggerd/tombstone.cpp",
"libdebuggerd/utility.cpp",
],
local_include_dirs: ["libdebuggerd/include"],
export_include_dirs: ["libdebuggerd/include"],
// Needed for private/bionic_fdsan.h
include_dirs: ["bionic/libc"],
static_libs: [
"libbacktrace",
"libdexfile_external", // libunwindstack dependency
"libdexfile_support", // libunwindstack dependency
"libunwindstack",
"liblzma",
"libbase",
"libcutils",
"liblog",
],
target: {
recovery: {
exclude_static_libs: [
"libdexfile_external",
"libdexfile_support",
],
},
},
}
cc_test {
name: "debuggerd_test",
defaults: ["debuggerd_defaults"],
cflags: ["-Wno-missing-field-initializers"],
srcs: [
"libdebuggerd/test/dump_memory_test.cpp",
"libdebuggerd/test/elf_fake.cpp",
"libdebuggerd/test/log_fake.cpp",
"libdebuggerd/test/open_files_list_test.cpp",
"libdebuggerd/test/tombstone_test.cpp",
],
target: {
android: {
srcs: [
"client/debuggerd_client_test.cpp",
"debuggerd_test.cpp",
],
static_libs: [
"libasync_safe",
"libtombstoned_client_static",
],
},
},
shared_libs: [
"libbacktrace",
"libbase",
"libcutils",
"libdebuggerd_client",
"liblog",
"libminijail",
"libnativehelper",
],
static_libs: [
"libdebuggerd",
"libdexfile_external", // libunwindstack dependency
"libdexfile_support", // libunwindstack dependency
"libunwindstack",
],
local_include_dirs: [
"libdebuggerd",
],
compile_multilib: "both",
multilib: {
lib32: {
stem: "debuggerd_test32",
},
lib64: {
stem: "debuggerd_test64",
},
},
test_suites: ["device-tests"],
}
cc_benchmark {
name: "debuggerd_benchmark",
defaults: ["debuggerd_defaults"],
srcs: ["debuggerd_benchmark.cpp"],
shared_libs: [
"libbase",
"libdebuggerd_client",
],
}
cc_binary {
name: "crash_dump",
srcs: [
"crash_dump.cpp",
"util.cpp",
],
defaults: ["debuggerd_defaults"],
compile_multilib: "both",
multilib: {
lib32: {
suffix: "32",
},
lib64: {
suffix: "64",
},
},
static_libs: [
"libtombstoned_client_static",
"libdebuggerd",
"libcutils",
],
shared_libs: [
"libbacktrace",
"libbase",
"liblog",
"libprocinfo",
"libunwindstack",
],
}
cc_binary {
name: "debuggerd",
srcs: [
"debuggerd.cpp",
],
defaults: ["debuggerd_defaults"],
shared_libs: [
"libbase",
"libdebuggerd_client",
"liblog",
"libprocinfo",
],
local_include_dirs: ["include"],
}
cc_binary {
name: "tombstoned",
srcs: [
"util.cpp",
"tombstoned/intercept_manager.cpp",
"tombstoned/tombstoned.cpp",
],
defaults: ["debuggerd_defaults"],
header_libs: ["libdebuggerd_common_headers"],
static_libs: [
"libbase",
"libcutils",
"libevent",
"liblog",
],
init_rc: ["tombstoned/tombstoned.rc"],
}
subdirs = [
"crasher",
]