| 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", | 
| Dan Willemsen | 194edf7 | 2016-08-26 15:01:36 -0700 | [diff] [blame] | 12 |     ], | 
| Christopher Ferris | 47dea71 | 2017-05-03 17:34:29 -0700 | [diff] [blame] | 13 |  | 
 | 14 |     target: { | 
 | 15 |         android: { | 
 | 16 |             static_libs: ["libasync_safe"], | 
 | 17 |         }, | 
 | 18 |         host: { | 
 | 19 |             shared_libs: ["liblog"], | 
 | 20 |         } | 
 | 21 |     }, | 
| Dan Willemsen | 194edf7 | 2016-08-26 15:01:36 -0700 | [diff] [blame] | 22 | } | 
 | 23 |  | 
 | 24 | cc_library_shared { | 
 | 25 |     name: "libmemunreachable", | 
 | 26 |     defaults: ["libmemunreachable_defaults"], | 
 | 27 |     srcs: [ | 
 | 28 |         "Allocator.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", | 
| Dan Willemsen | 194edf7 | 2016-08-26 15:01:36 -0700 | [diff] [blame] | 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 | } |