2016-08-27 00:01:36 +02:00
|
|
|
cc_defaults {
|
|
|
|
name: "libmemunreachable_defaults",
|
|
|
|
|
|
|
|
cflags: [
|
|
|
|
"-Wall",
|
|
|
|
"-Wextra",
|
|
|
|
"-Werror",
|
|
|
|
],
|
|
|
|
shared_libs: [
|
|
|
|
"libbase",
|
|
|
|
],
|
2017-05-04 02:34:29 +02:00
|
|
|
|
|
|
|
target: {
|
|
|
|
android: {
|
|
|
|
static_libs: ["libasync_safe"],
|
|
|
|
},
|
|
|
|
host: {
|
|
|
|
shared_libs: ["liblog"],
|
2018-02-17 02:58:14 +01:00
|
|
|
},
|
2017-05-04 02:34:29 +02:00
|
|
|
},
|
2016-08-27 00:01:36 +02:00
|
|
|
}
|
|
|
|
|
2018-02-28 01:00:00 +01:00
|
|
|
cc_library {
|
2016-08-27 00:01:36 +02:00
|
|
|
name: "libmemunreachable",
|
|
|
|
defaults: ["libmemunreachable_defaults"],
|
|
|
|
srcs: [
|
|
|
|
"Allocator.cpp",
|
2017-06-21 03:07:29 +02:00
|
|
|
"Binder.cpp",
|
2016-08-27 00:01:36 +02:00
|
|
|
"HeapWalker.cpp",
|
|
|
|
"LeakFolding.cpp",
|
|
|
|
"LeakPipe.cpp",
|
|
|
|
"LineBuffer.cpp",
|
|
|
|
"MemUnreachable.cpp",
|
|
|
|
"ProcessMappings.cpp",
|
|
|
|
"PtracerThread.cpp",
|
|
|
|
"ThreadCapture.cpp",
|
|
|
|
],
|
|
|
|
|
|
|
|
static_libs: [
|
|
|
|
"libc_malloc_debug_backtrace",
|
|
|
|
],
|
|
|
|
// Only need this for arm since libc++ uses its own unwind code that
|
|
|
|
// doesn't mix with the other default unwind code.
|
|
|
|
arch: {
|
|
|
|
arm: {
|
|
|
|
static_libs: ["libunwind_llvm"],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
export_include_dirs: ["include"],
|
|
|
|
local_include_dirs: ["include"],
|
|
|
|
}
|
|
|
|
|
|
|
|
cc_test {
|
|
|
|
name: "memunreachable_test",
|
|
|
|
defaults: ["libmemunreachable_defaults"],
|
|
|
|
host_supported: true,
|
|
|
|
srcs: [
|
|
|
|
"tests/Allocator_test.cpp",
|
|
|
|
"tests/HeapWalker_test.cpp",
|
|
|
|
"tests/LeakFolding_test.cpp",
|
|
|
|
],
|
|
|
|
|
|
|
|
target: {
|
|
|
|
android: {
|
|
|
|
srcs: [
|
|
|
|
"tests/DisableMalloc_test.cpp",
|
|
|
|
"tests/MemUnreachable_test.cpp",
|
|
|
|
"tests/ThreadCapture_test.cpp",
|
|
|
|
],
|
|
|
|
shared_libs: [
|
|
|
|
"libmemunreachable",
|
|
|
|
],
|
|
|
|
},
|
|
|
|
host: {
|
|
|
|
srcs: [
|
|
|
|
"Allocator.cpp",
|
|
|
|
"HeapWalker.cpp",
|
|
|
|
"LeakFolding.cpp",
|
|
|
|
"tests/HostMallocStub.cpp",
|
|
|
|
],
|
|
|
|
},
|
|
|
|
darwin: {
|
|
|
|
enabled: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
2017-06-21 03:07:29 +02:00
|
|
|
|
|
|
|
cc_test {
|
|
|
|
name: "memunreachable_binder_test",
|
|
|
|
defaults: ["libmemunreachable_defaults"],
|
|
|
|
srcs: [
|
|
|
|
"tests/Binder_test.cpp",
|
|
|
|
],
|
2018-02-28 01:00:00 +01:00
|
|
|
static_libs: ["libmemunreachable"],
|
2017-06-21 03:07:29 +02:00
|
|
|
shared_libs: [
|
|
|
|
"libbinder",
|
|
|
|
"libhwbinder",
|
|
|
|
"libutils",
|
|
|
|
],
|
|
|
|
}
|