| Dan Willemsen | 194edf7 | 2016-08-26 15:01:36 -0700 | [diff] [blame] | 1 | cc_defaults { | 
 | 2 |     name: "libmemunreachable_defaults", | 
 | 3 |  | 
 | 4 |     cflags: [ | 
| Dan Willemsen | 194edf7 | 2016-08-26 15:01:36 -0700 | [diff] [blame] | 5 |         "-Wall", | 
 | 6 |         "-Wextra", | 
 | 7 |         "-Werror", | 
 | 8 |     ], | 
 | 9 |     clang: true, | 
 | 10 |     shared_libs: [ | 
 | 11 |         "libbase", | 
 | 12 |         "liblog", | 
 | 13 |     ], | 
 | 14 | } | 
 | 15 |  | 
 | 16 | cc_library_shared { | 
 | 17 |     name: "libmemunreachable", | 
 | 18 |     defaults: ["libmemunreachable_defaults"], | 
 | 19 |     srcs: [ | 
 | 20 |         "Allocator.cpp", | 
 | 21 |         "HeapWalker.cpp", | 
 | 22 |         "LeakFolding.cpp", | 
 | 23 |         "LeakPipe.cpp", | 
 | 24 |         "LineBuffer.cpp", | 
 | 25 |         "MemUnreachable.cpp", | 
 | 26 |         "ProcessMappings.cpp", | 
 | 27 |         "PtracerThread.cpp", | 
 | 28 |         "ThreadCapture.cpp", | 
 | 29 |     ], | 
 | 30 |  | 
 | 31 |     static_libs: [ | 
 | 32 |         "libc_malloc_debug_backtrace", | 
 | 33 |         "libc_logging", | 
 | 34 |     ], | 
 | 35 |     // Only need this for arm since libc++ uses its own unwind code that | 
 | 36 |     // doesn't mix with the other default unwind code. | 
 | 37 |     arch: { | 
 | 38 |         arm: { | 
 | 39 |             static_libs: ["libunwind_llvm"], | 
 | 40 |         }, | 
 | 41 |     }, | 
 | 42 |     export_include_dirs: ["include"], | 
 | 43 |     local_include_dirs: ["include"], | 
 | 44 | } | 
 | 45 |  | 
 | 46 | cc_test { | 
 | 47 |     name: "memunreachable_test", | 
 | 48 |     defaults: ["libmemunreachable_defaults"], | 
 | 49 |     host_supported: true, | 
 | 50 |     srcs: [ | 
 | 51 |         "tests/Allocator_test.cpp", | 
 | 52 |         "tests/HeapWalker_test.cpp", | 
 | 53 |         "tests/LeakFolding_test.cpp", | 
 | 54 |     ], | 
 | 55 |  | 
 | 56 |     target: { | 
 | 57 |         android: { | 
 | 58 |             srcs: [ | 
 | 59 |                 "tests/DisableMalloc_test.cpp", | 
 | 60 |                 "tests/MemUnreachable_test.cpp", | 
 | 61 |                 "tests/ThreadCapture_test.cpp", | 
 | 62 |             ], | 
 | 63 |             shared_libs: [ | 
 | 64 |                 "libmemunreachable", | 
 | 65 |             ], | 
 | 66 |         }, | 
 | 67 |         host: { | 
 | 68 |             srcs: [ | 
 | 69 |                 "Allocator.cpp", | 
 | 70 |                 "HeapWalker.cpp", | 
 | 71 |                 "LeakFolding.cpp", | 
 | 72 |                 "tests/HostMallocStub.cpp", | 
 | 73 |             ], | 
 | 74 |         }, | 
 | 75 |         darwin: { | 
 | 76 |             enabled: false, | 
 | 77 |         }, | 
 | 78 |     }, | 
 | 79 | } |