blob: 06e91c65604bca74696ad3797c5b46f2adcbf7de [file] [log] [blame]
Christopher Ferrisd6a1dc22018-02-07 18:42:14 -08001// ==============================================================
2// libc_malloc_hooks.so
3// ==============================================================
Bob Badouraa7d8352021-02-19 13:06:22 -08004package {
Aditya Choudharyd9d37c02024-02-02 13:57:12 +00005 default_team: "trendy_team_native_tools_libraries",
Bob Badouraa7d8352021-02-19 13:06:22 -08006 // 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
Christopher Ferrisd6a1dc22018-02-07 18:42:14 -080014cc_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 ],
Jiyong Parkf302cfb2019-10-07 15:52:21 +090045
46 apex_available: [
47 "com.android.runtime",
48 ],
49 static: {
50 apex_available: [
51 "//apex_available:platform",
52 ],
53 },
Christopher Ferrisd6a1dc22018-02-07 18:42:14 -080054}
55
56// ==============================================================
57// Unit Tests
58// ==============================================================
59cc_test {
Christopher Ferrise4619f72019-11-11 14:17:44 -080060 name: "malloc_hooks_system_tests",
61 isolated: true,
Christopher Ferrisd6a1dc22018-02-07 18:42:14 -080062
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"],
Christopher Ferris2b0638e2019-09-11 19:05:29 -070072 include_dirs: [
73 "bionic/libc",
Elliott Hughes1eacc0e2024-01-19 19:05:36 +000074 "bionic",
Christopher Ferris2b0638e2019-09-11 19:05:29 -070075 ],
76 header_libs: [
77 "bionic_libc_platform_headers",
78 ],
Christopher Ferrisd6a1dc22018-02-07 18:42:14 -080079
80 cflags: [
81 "-Wall",
82 "-Werror",
Elliott Hughes1eacc0e2024-01-19 19:05:36 +000083 "-O1", // FIXME: http://b/169206016 - issues with aligned_alloc and -O2
Christopher Ferrisd6a1dc22018-02-07 18:42:14 -080084 ],
Christopher Ferrise4619f72019-11-11 14:17:44 -080085 test_suites: ["general-tests"],
Christopher Ferrisd6a1dc22018-02-07 18:42:14 -080086}