blob: 01394da6ed0551fda8e5e39b820eb3bff500e7ca [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 {
5 // See: http://go/android-license-faq
6 // A large-scale-change added 'default_applicable_licenses' to import
7 // all of the 'license_kinds' from "bionic_libc_license"
8 // to get the below license kinds:
9 // SPDX-license-identifier-BSD
10 default_applicable_licenses: ["bionic_libc_license"],
11}
12
Christopher Ferrisd6a1dc22018-02-07 18:42:14 -080013cc_library {
14 name: "libc_malloc_hooks",
15
16 srcs: [
17 "malloc_hooks.cpp",
18 ],
19
20 static_libs: [
21 "libasync_safe",
22 ],
23
24 multilib: {
25 lib32: {
26 version_script: "exported32.map",
27 },
28 lib64: {
29 version_script: "exported64.map",
30 },
31 },
32 include_dirs: ["bionic/libc"],
33
34 sanitize: {
35 never: true,
36 },
37 native_coverage: false,
38
39 cflags: [
40 "-Wall",
41 "-Werror",
42 "-fno-stack-protector",
43 ],
Jiyong Parkf302cfb2019-10-07 15:52:21 +090044
45 apex_available: [
46 "com.android.runtime",
47 ],
48 static: {
49 apex_available: [
50 "//apex_available:platform",
51 ],
52 },
Christopher Ferrisd6a1dc22018-02-07 18:42:14 -080053}
54
55// ==============================================================
56// Unit Tests
57// ==============================================================
58cc_test {
Christopher Ferrise4619f72019-11-11 14:17:44 -080059 name: "malloc_hooks_system_tests",
60 isolated: true,
Christopher Ferrisd6a1dc22018-02-07 18:42:14 -080061
62 srcs: [
63 "tests/malloc_hooks_tests.cpp",
64 ],
65
66 whole_static_libs: ["libc_malloc_hooks"],
67
68 shared_libs: ["libbase"],
69
70 local_include_dirs: ["tests"],
Christopher Ferris2b0638e2019-09-11 19:05:29 -070071 include_dirs: [
72 "bionic/libc",
73 "bionic"
74 ],
75 header_libs: [
76 "bionic_libc_platform_headers",
77 ],
Christopher Ferrisd6a1dc22018-02-07 18:42:14 -080078
79 cflags: [
80 "-Wall",
81 "-Werror",
Stephen Hines1c33c4a2020-09-24 17:17:57 -070082 "-O1", // FIXME: http://b/169206016 - issues with aligned_alloc and -O2
Christopher Ferrisd6a1dc22018-02-07 18:42:14 -080083 ],
Christopher Ferrise4619f72019-11-11 14:17:44 -080084 test_suites: ["general-tests"],
Christopher Ferrisd6a1dc22018-02-07 18:42:14 -080085}