Christopher Ferris | d6a1dc2 | 2018-02-07 18:42:14 -0800 | [diff] [blame] | 1 | // ============================================================== |
| 2 | // libc_malloc_hooks.so |
| 3 | // ============================================================== |
| 4 | cc_library { |
| 5 | name: "libc_malloc_hooks", |
| 6 | |
| 7 | srcs: [ |
| 8 | "malloc_hooks.cpp", |
| 9 | ], |
| 10 | |
| 11 | static_libs: [ |
| 12 | "libasync_safe", |
| 13 | ], |
| 14 | |
| 15 | multilib: { |
| 16 | lib32: { |
| 17 | version_script: "exported32.map", |
| 18 | }, |
| 19 | lib64: { |
| 20 | version_script: "exported64.map", |
| 21 | }, |
| 22 | }, |
| 23 | include_dirs: ["bionic/libc"], |
| 24 | |
| 25 | sanitize: { |
| 26 | never: true, |
| 27 | }, |
| 28 | native_coverage: false, |
| 29 | |
| 30 | cflags: [ |
| 31 | "-Wall", |
| 32 | "-Werror", |
| 33 | "-fno-stack-protector", |
| 34 | ], |
Jiyong Park | f302cfb | 2019-10-07 15:52:21 +0900 | [diff] [blame] | 35 | |
| 36 | apex_available: [ |
| 37 | "com.android.runtime", |
| 38 | ], |
| 39 | static: { |
| 40 | apex_available: [ |
| 41 | "//apex_available:platform", |
| 42 | ], |
| 43 | }, |
Christopher Ferris | d6a1dc2 | 2018-02-07 18:42:14 -0800 | [diff] [blame] | 44 | } |
| 45 | |
| 46 | // ============================================================== |
| 47 | // Unit Tests |
| 48 | // ============================================================== |
| 49 | cc_test { |
Christopher Ferris | e4619f7 | 2019-11-11 14:17:44 -0800 | [diff] [blame^] | 50 | name: "malloc_hooks_system_tests", |
| 51 | isolated: true, |
Christopher Ferris | d6a1dc2 | 2018-02-07 18:42:14 -0800 | [diff] [blame] | 52 | |
| 53 | srcs: [ |
| 54 | "tests/malloc_hooks_tests.cpp", |
| 55 | ], |
| 56 | |
| 57 | whole_static_libs: ["libc_malloc_hooks"], |
| 58 | |
| 59 | shared_libs: ["libbase"], |
| 60 | |
| 61 | local_include_dirs: ["tests"], |
Christopher Ferris | 2b0638e | 2019-09-11 19:05:29 -0700 | [diff] [blame] | 62 | include_dirs: [ |
| 63 | "bionic/libc", |
| 64 | "bionic" |
| 65 | ], |
| 66 | header_libs: [ |
| 67 | "bionic_libc_platform_headers", |
| 68 | ], |
Christopher Ferris | d6a1dc2 | 2018-02-07 18:42:14 -0800 | [diff] [blame] | 69 | |
| 70 | cflags: [ |
| 71 | "-Wall", |
| 72 | "-Werror", |
| 73 | ], |
Christopher Ferris | e4619f7 | 2019-11-11 14:17:44 -0800 | [diff] [blame^] | 74 | test_suites: ["general-tests"], |
Christopher Ferris | d6a1dc2 | 2018-02-07 18:42:14 -0800 | [diff] [blame] | 75 | } |