summaryrefslogtreecommitdiff
path: root/libs/binder/tests/parcel_fuzzer/Android.bp
blob: 4b1bd2f591e6fffd46a073cd59b3e057cdabb82b (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
76
77
78
79
80
81
82
83
package {
    // See: http://go/android-license-faq
    // A large-scale-change added 'default_applicable_licenses' to import
    // all of the 'license_kinds' from "frameworks_native_license"
    // to get the below license kinds:
    //   SPDX-license-identifier-Apache-2.0
    default_applicable_licenses: ["frameworks_native_license"],
}

cc_fuzz {
    name: "binder_parcel_fuzzer",
    host_supported: true,

    fuzz_config: {
        cc: ["smoreland@google.com"],
    },

    srcs: [
        "binder.cpp",
        "binder_ndk.cpp",
        "hwbinder.cpp",
        "main.cpp",
        "random_fd.cpp",
        "random_parcel.cpp",
        "util.cpp",
    ],
    static_libs: [
        "libbase",
        "libbinder_random_parcel",
        "libcgrouprc",
        "libcgrouprc_format",
        "libcutils",
        "libhidlbase",
        "liblog",
        "libprocessgroup",
        "libjsoncpp",
        "libutils",
    ],

    target: {
        android: {
            shared_libs: [
                "libbinder_ndk",
                "libbinder",
            ],
        },
        host: {
            static_libs: [
                "libbinder_ndk",
                "libbinder",
            ],
        },
        darwin: {
            enabled: false,
        },
    },
    // This flag enables verbose output in the fuzz target, and is very useful
    // for debugging a failure. If you are trying to diagnose how a crash was
    // produced, you may find uncommenting the below line very useful.
    // cflags: ["-DENABLE_LOG_FUZZ"],
}

cc_library_static {
    name: "libbinder_random_parcel",
    host_supported: true,
    target: {
        darwin: {
            enabled: false,
        },
    },
    srcs: [
        "random_fd.cpp",
        "random_parcel.cpp",
    ],
    shared_libs: [
        "libbase",
        "libbinder",
        "libcutils",
        "libutils",
    ],
    local_include_dirs: ["include_random_parcel"],
    export_include_dirs: ["include_random_parcel"],
}