File: Android.bp

package info (click to toggle)
android-platform-tools 34.0.5-12
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 150,900 kB
  • sloc: cpp: 805,786; java: 293,500; ansic: 128,288; xml: 127,491; python: 41,481; sh: 14,245; javascript: 9,665; cs: 3,846; asm: 2,049; makefile: 1,917; yacc: 440; awk: 368; ruby: 183; sql: 140; perl: 88; lex: 67
file content (139 lines) | stat: -rw-r--r-- 3,283 bytes parent folder | download | duplicates (2)
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
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"],
}

rust_test {
    name: "rustBinderTest",
    srcs: ["integration.rs"],
    rustlibs: [
        "libbinder_rs",
        "libselinux_bindgen",
        "libbinder_tokio_rs",
        "libtokio",
    ],
    shared_libs: [
        "libselinux",
    ],
    // For the binaries to be pushed properly as specified in AndroidTest.xml,
    // this cannot be the same as the module name.
    stem: "rustBinderTestClientBinary",
    test_suites: ["general-tests"],
}

rust_test {
    name: "rustBinderTestService",
    srcs: ["integration.rs"],
    rustlibs: [
        "libbinder_rs",
        "liblibc",
    ],
    // For the binaries to be pushed properly as specified in AndroidTest.xml,
    // this cannot be the same as the module name.
    stem: "rustBinderTestServiceBinary",
    test_harness: false,
    // TODO(b/164473602): Remove this setting and add the module to `data`
    // attribute of rustBinderTest.
    auto_gen_config: false,
    test_suites: ["general-tests"],
}

cc_test {
    name: "binderRustNdkInteropTest",
    srcs: [
        "binderRustNdkInteropTest.cpp",
    ],
    shared_libs: [
        "libbinder",
        "libbinder_ndk",
    ],
    static_libs: [
        "IBinderRustNdkInteropTest-ndk",
        "libbinder_ndk_rust_interop",
    ],
    test_suites: ["general-tests"],
    require_root: true,

    // rustBinderTestService uses a custom config
    auto_gen_config: true,
}

aidl_interface {
    name: "IBinderRustNdkInteropTest",
    unstable: true,
    srcs: [
        "IBinderRustNdkInteropTest.aidl",
        "IBinderRustNdkInteropTestOther.aidl",
    ],
    backend: {
        ndk: {
            enabled: true,
        },
        rust: {
            enabled: true,
        },
    },
}

rust_ffi_static {
    name: "libbinder_ndk_rust_interop",
    crate_name: "binder_ndk_rust_interop",
    srcs: [
        "ndk_rust_interop.rs",
    ],
    rustlibs: [
        "libbinder_rs",
        "IBinderRustNdkInteropTest-rust",
    ],
}

cc_test {
    name: "rustBinderSerializationTest",
    shared_libs: [
        "libbinder",
        "libbinder_ndk",
        "libutils",
        "libbase",
    ],
    static_libs: [
        "libbinder_rs_serialization_test"
    ],
    srcs: [
        "serialization.cpp",
    ],
    auto_gen_config: true,
    test_suites: ["general-tests"],
}

rust_bindgen {
    name: "libbinder_rs_serialization_bindgen",
    crate_name: "binder_rs_serialization_bindgen",
    wrapper_src: "serialization.hpp",
    source_stem: "bindings",
    cpp_std: "gnu++17",
    bindgen_flags: [
        "--allowlist-type", "Transaction",
        "--allowlist-var", "TESTDATA_.*",
    ],

    shared_libs: [
        "libbinder",
        "libc++",
    ],
}

rust_ffi_static {
    name: "libbinder_rs_serialization_test",
    crate_name: "binder_rs_serialization_test",
    srcs: [
        "serialization.rs",
        ":libbinder_rs_serialization_bindgen",
    ],
    rustlibs: [
        "libbinder_rs",
    ],
}