Home | History | Annotate | Download | only in libmemunreachable
      1 cc_defaults {
      2     name: "libmemunreachable_defaults",
      3 
      4     cflags: [
      5         "-Wall",
      6         "-Wextra",
      7         "-Werror",
      8     ],
      9     shared_libs: [
     10         "libbase",
     11     ],
     12 
     13     target: {
     14         android: {
     15             static_libs: ["libasync_safe"],
     16         },
     17         host: {
     18             shared_libs: ["liblog"],
     19         },
     20     },
     21 }
     22 
     23 cc_library {
     24     name: "libmemunreachable",
     25     defaults: ["libmemunreachable_defaults"],
     26     srcs: [
     27         "Allocator.cpp",
     28         "Binder.cpp",
     29         "HeapWalker.cpp",
     30         "LeakFolding.cpp",
     31         "LeakPipe.cpp",
     32         "LineBuffer.cpp",
     33         "MemUnreachable.cpp",
     34         "ProcessMappings.cpp",
     35         "PtracerThread.cpp",
     36         "ThreadCapture.cpp",
     37     ],
     38 
     39     static_libs: [
     40         "libc_malloc_debug_backtrace",
     41     ],
     42     // Only need this for arm since libc++ uses its own unwind code that
     43     // doesn't mix with the other default unwind code.
     44     arch: {
     45         arm: {
     46             static_libs: ["libunwind_llvm"],
     47         },
     48     },
     49     export_include_dirs: ["include"],
     50     local_include_dirs: ["include"],
     51 }
     52 
     53 cc_test {
     54     name: "memunreachable_test",
     55     defaults: ["libmemunreachable_defaults"],
     56     host_supported: true,
     57     srcs: [
     58         "tests/Allocator_test.cpp",
     59         "tests/HeapWalker_test.cpp",
     60         "tests/LeakFolding_test.cpp",
     61     ],
     62 
     63     target: {
     64         android: {
     65             srcs: [
     66                 "tests/DisableMalloc_test.cpp",
     67                 "tests/MemUnreachable_test.cpp",
     68                 "tests/ThreadCapture_test.cpp",
     69             ],
     70             shared_libs: [
     71                 "libmemunreachable",
     72             ],
     73         },
     74         host: {
     75             srcs: [
     76                 "Allocator.cpp",
     77                 "HeapWalker.cpp",
     78                 "LeakFolding.cpp",
     79                 "tests/HostMallocStub.cpp",
     80             ],
     81         },
     82         darwin: {
     83             enabled: false,
     84         },
     85     },
     86 }
     87 
     88 cc_test {
     89     name: "memunreachable_binder_test",
     90     defaults: ["libmemunreachable_defaults"],
     91     srcs: [
     92         "tests/Binder_test.cpp",
     93     ],
     94     static_libs: ["libmemunreachable"],
     95     shared_libs: [
     96         "libbinder",
     97         "libhwbinder",
     98         "libutils",
     99     ],
    100 }
    101