1// ============================================================== 2// libc_malloc_hooks.so 3// ============================================================== 4package { 5 default_team: "trendy_team_native_tools_libraries", 6 // See: http://go/android-license-faq 7 // A large-scale-change added 'default_applicable_licenses' to import 8 // all of the 'license_kinds' from "bionic_libc_license" 9 // to get the below license kinds: 10 // SPDX-license-identifier-BSD 11 default_applicable_licenses: ["bionic_libc_license"], 12} 13 14cc_library { 15 name: "libc_malloc_hooks", 16 17 srcs: [ 18 "malloc_hooks.cpp", 19 ], 20 21 static_libs: [ 22 "libasync_safe", 23 ], 24 25 multilib: { 26 lib32: { 27 version_script: "exported32.map", 28 }, 29 lib64: { 30 version_script: "exported64.map", 31 }, 32 }, 33 include_dirs: ["bionic/libc"], 34 35 sanitize: { 36 never: true, 37 }, 38 native_coverage: false, 39 40 cflags: [ 41 "-Wall", 42 "-Werror", 43 "-fno-stack-protector", 44 ], 45 46 apex_available: [ 47 "com.android.runtime", 48 ], 49 static: { 50 apex_available: [ 51 "//apex_available:platform", 52 ], 53 }, 54} 55 56// ============================================================== 57// Unit Tests 58// ============================================================== 59cc_test { 60 name: "malloc_hooks_system_tests", 61 isolated: true, 62 63 srcs: [ 64 "tests/malloc_hooks_tests.cpp", 65 ], 66 67 whole_static_libs: ["libc_malloc_hooks"], 68 69 shared_libs: ["libbase"], 70 71 local_include_dirs: ["tests"], 72 include_dirs: [ 73 "bionic/libc", 74 "bionic", 75 ], 76 header_libs: [ 77 "bionic_libc_platform_headers", 78 ], 79 80 cflags: [ 81 "-Wall", 82 "-Werror", 83 "-O1", // FIXME: http://b/169206016 - issues with aligned_alloc and -O2 84 ], 85 test_suites: ["general-tests"], 86} 87