aboutsummaryrefslogtreecommitdiff
path: root/libc/malloc_hooks/Android.bp
blob: 77b523ec4a27ec6a4fe11027ed2a56253280ccad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
// ==============================================================
// libc_malloc_hooks.so
// ==============================================================
cc_library {
    name: "libc_malloc_hooks",

    srcs: [
        "malloc_hooks.cpp",
    ],

    static_libs: [
        "libasync_safe",
    ],

    multilib: {
        lib32: {
            version_script: "exported32.map",
        },
        lib64: {
            version_script: "exported64.map",
        },
    },
    include_dirs: ["bionic/libc"],

    sanitize: {
        never: true,
    },
    native_coverage: false,

    cflags: [
        "-Wall",
        "-Werror",
        "-fno-stack-protector",
    ],

    apex_available: [
        "com.android.runtime",
    ],
    static: {
        apex_available: [
            "//apex_available:platform",
        ],
    },
}

// ==============================================================
// Unit Tests
// ==============================================================
cc_test {
    name: "malloc_hooks_system_tests",
    isolated: true,

    srcs: [
        "tests/malloc_hooks_tests.cpp",
    ],

    whole_static_libs: ["libc_malloc_hooks"],

    shared_libs: ["libbase"],

    local_include_dirs: ["tests"],
    include_dirs: [
        "bionic/libc",
        "bionic"
    ],
    header_libs: [
        "bionic_libc_platform_headers",
    ],

    cflags: [
        "-Wall",
        "-Werror",
    ],
    test_suites: ["general-tests"],
}