2016-07-13 20:15:21 +02:00
|
|
|
// ==============================================================
|
|
|
|
// libc_malloc_debug_backtrace.a
|
|
|
|
// ==============================================================
|
|
|
|
// Used by libmemunreachable
|
|
|
|
cc_library_static {
|
|
|
|
|
|
|
|
name: "libc_malloc_debug_backtrace",
|
|
|
|
|
|
|
|
srcs: [
|
|
|
|
"backtrace.cpp",
|
|
|
|
"MapData.cpp",
|
|
|
|
],
|
|
|
|
|
|
|
|
stl: "libc++_static",
|
|
|
|
|
2017-06-01 23:16:32 +02:00
|
|
|
whole_static_libs: ["libasync_safe", "libdemangle"],
|
2016-07-13 20:15:21 +02:00
|
|
|
|
|
|
|
include_dirs: ["bionic/libc"],
|
2017-04-25 02:48:32 +02:00
|
|
|
|
2016-07-13 20:15:21 +02:00
|
|
|
export_include_dirs: ["."],
|
|
|
|
|
|
|
|
sanitize: {
|
|
|
|
never: true,
|
|
|
|
},
|
|
|
|
native_coverage: false,
|
|
|
|
|
|
|
|
// -Wno-error=format-zero-length needed for gcc to compile.
|
|
|
|
cflags: [
|
|
|
|
"-Wall",
|
|
|
|
"-Werror",
|
|
|
|
"-Wno-error=format-zero-length",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
// ==============================================================
|
|
|
|
// libc_malloc_debug.so
|
|
|
|
// ==============================================================
|
|
|
|
cc_library {
|
|
|
|
name: "libc_malloc_debug",
|
|
|
|
|
|
|
|
srcs: [
|
|
|
|
"BacktraceData.cpp",
|
|
|
|
"Config.cpp",
|
|
|
|
"DebugData.cpp",
|
|
|
|
"debug_disable.cpp",
|
|
|
|
"FreeTrackData.cpp",
|
|
|
|
"GuardData.cpp",
|
|
|
|
"malloc_debug.cpp",
|
|
|
|
"RecordData.cpp",
|
|
|
|
"TrackData.cpp",
|
|
|
|
],
|
|
|
|
|
|
|
|
stl: "libc++_static",
|
|
|
|
|
|
|
|
// 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"],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
static_libs: [
|
2017-04-25 02:48:32 +02:00
|
|
|
"libasync_safe",
|
2016-07-13 20:15:21 +02:00
|
|
|
"libbase",
|
|
|
|
"libc_malloc_debug_backtrace",
|
|
|
|
],
|
|
|
|
|
|
|
|
multilib: {
|
|
|
|
lib32: {
|
|
|
|
version_script: "exported32.map",
|
|
|
|
},
|
|
|
|
lib64: {
|
|
|
|
version_script: "exported64.map",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
allow_undefined_symbols: true,
|
|
|
|
include_dirs: ["bionic/libc"],
|
|
|
|
|
|
|
|
sanitize: {
|
|
|
|
never: true,
|
|
|
|
},
|
|
|
|
native_coverage: false,
|
|
|
|
|
|
|
|
// -Wno-error=format-zero-length needed for gcc to compile.
|
|
|
|
cflags: [
|
|
|
|
"-Wall",
|
|
|
|
"-Werror",
|
|
|
|
"-fno-stack-protector",
|
|
|
|
"-Wno-error=format-zero-length",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
// ==============================================================
|
|
|
|
// Unit Tests
|
|
|
|
// ==============================================================
|
|
|
|
cc_test {
|
|
|
|
|
|
|
|
name: "malloc_debug_unit_tests",
|
|
|
|
multilib: {
|
|
|
|
lib32: {
|
|
|
|
suffix: "32",
|
|
|
|
},
|
|
|
|
lib64: {
|
|
|
|
suffix: "64",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
srcs: [
|
|
|
|
"tests/backtrace_fake.cpp",
|
|
|
|
"tests/log_fake.cpp",
|
|
|
|
"tests/libc_fake.cpp",
|
|
|
|
"tests/malloc_debug_config_tests.cpp",
|
|
|
|
"tests/malloc_debug_unit_tests.cpp",
|
|
|
|
],
|
|
|
|
|
|
|
|
whole_static_libs: ["libc_malloc_debug"],
|
|
|
|
|
|
|
|
local_include_dirs: ["tests"],
|
2017-04-25 02:48:32 +02:00
|
|
|
include_dirs: ["bionic/libc", "bionic/libc/async_safe/include"],
|
2016-07-13 20:15:21 +02:00
|
|
|
|
|
|
|
shared_libs: ["libbase"],
|
|
|
|
|
|
|
|
cflags: [
|
|
|
|
"-Wall",
|
|
|
|
"-Werror",
|
|
|
|
"-Wno-error=format-zero-length",
|
|
|
|
],
|
|
|
|
}
|