| 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 | ], | 
| Dan Willemsen | 194edf7 | 2016-08-26 15:01:36 -0700 | [diff] [blame] | 9 | shared_libs: [ | 
|  | 10 | "libbase", | 
| Dan Willemsen | 194edf7 | 2016-08-26 15:01:36 -0700 | [diff] [blame] | 11 | ], | 
| Christopher Ferris | 47dea71 | 2017-05-03 17:34:29 -0700 | [diff] [blame] | 12 |  | 
|  | 13 | target: { | 
|  | 14 | android: { | 
|  | 15 | static_libs: ["libasync_safe"], | 
|  | 16 | }, | 
|  | 17 | host: { | 
|  | 18 | shared_libs: ["liblog"], | 
| Elliott Hughes | dc699a2 | 2018-02-16 17:58:14 -0800 | [diff] [blame] | 19 | }, | 
| Christopher Ferris | 47dea71 | 2017-05-03 17:34:29 -0700 | [diff] [blame] | 20 | }, | 
| Dan Willemsen | 194edf7 | 2016-08-26 15:01:36 -0700 | [diff] [blame] | 21 | } | 
|  | 22 |  | 
| Colin Cross | 51e6c25 | 2018-02-27 16:00:00 -0800 | [diff] [blame] | 23 | cc_library { | 
| Dan Willemsen | 194edf7 | 2016-08-26 15:01:36 -0700 | [diff] [blame] | 24 | name: "libmemunreachable", | 
|  | 25 | defaults: ["libmemunreachable_defaults"], | 
|  | 26 | srcs: [ | 
|  | 27 | "Allocator.cpp", | 
| Colin Cross | f572b91 | 2017-06-20 18:07:29 -0700 | [diff] [blame] | 28 | "Binder.cpp", | 
| Dan Willemsen | 194edf7 | 2016-08-26 15:01:36 -0700 | [diff] [blame] | 29 | "HeapWalker.cpp", | 
|  | 30 | "LeakFolding.cpp", | 
|  | 31 | "LeakPipe.cpp", | 
| Dan Willemsen | 194edf7 | 2016-08-26 15:01:36 -0700 | [diff] [blame] | 32 | "MemUnreachable.cpp", | 
|  | 33 | "ProcessMappings.cpp", | 
|  | 34 | "PtracerThread.cpp", | 
|  | 35 | "ThreadCapture.cpp", | 
|  | 36 | ], | 
|  | 37 |  | 
|  | 38 | static_libs: [ | 
|  | 39 | "libc_malloc_debug_backtrace", | 
| Yabin Cui | 3841acc | 2018-05-10 17:19:12 -0700 | [diff] [blame] | 40 | "libprocinfo", | 
| 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 | }, | 
| Elliott Hughes | 40fdf3f | 2018-04-27 16:12:06 -0700 | [diff] [blame] | 86 |  | 
|  | 87 | test_suites: ["device-tests"], | 
| Dan Willemsen | 194edf7 | 2016-08-26 15:01:36 -0700 | [diff] [blame] | 88 | } | 
| Colin Cross | f572b91 | 2017-06-20 18:07:29 -0700 | [diff] [blame] | 89 |  | 
|  | 90 | cc_test { | 
|  | 91 | name: "memunreachable_binder_test", | 
|  | 92 | defaults: ["libmemunreachable_defaults"], | 
|  | 93 | srcs: [ | 
|  | 94 | "tests/Binder_test.cpp", | 
| Colin Cross | f572b91 | 2017-06-20 18:07:29 -0700 | [diff] [blame] | 95 | ], | 
| Colin Cross | 51e6c25 | 2018-02-27 16:00:00 -0800 | [diff] [blame] | 96 | static_libs: ["libmemunreachable"], | 
| Colin Cross | f572b91 | 2017-06-20 18:07:29 -0700 | [diff] [blame] | 97 | shared_libs: [ | 
|  | 98 | "libbinder", | 
|  | 99 | "libhwbinder", | 
| Colin Cross | f572b91 | 2017-06-20 18:07:29 -0700 | [diff] [blame] | 100 | "libutils", | 
|  | 101 | ], | 
| Elliott Hughes | 40fdf3f | 2018-04-27 16:12:06 -0700 | [diff] [blame] | 102 | test_suites: ["device-tests"], | 
| Colin Cross | f572b91 | 2017-06-20 18:07:29 -0700 | [diff] [blame] | 103 | } |