summaryrefslogtreecommitdiff
path: root/debuggerd/rust/tombstoned_client/Android.bp
blob: 2007f39343c6bfbb9d595ae8343a37b5f1a054c0 (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
package {
    default_applicable_licenses: ["Android-Apache-2.0"],
}

cc_library_static {
    name: "libtombstoned_client_wrapper",
    srcs: [
        "wrapper.cpp",
    ],
    generated_sources: [
        "libtombstoned_client_rust_bridge_code"
    ],
    header_libs: [
        "libbase_headers",
        "libdebuggerd_common_headers",
    ],
    shared_libs: [
        "libtombstoned_client",
    ],
    apex_available: ["com.android.virt"],
}

rust_defaults {
    name: "libtombstoned_client_rust_defaults",
    crate_name: "tombstoned_client",
    srcs: ["src/lib.rs"],
    edition: "2021",
    rustlibs: [
        "libcxx",
        "libthiserror",
    ],
    static_libs: [
        "libtombstoned_client_wrapper",
    ],
    shared_libs: [
        "libtombstoned_client",
    ],
}

rust_library {
    name: "libtombstoned_client_rust",
    defaults: ["libtombstoned_client_rust_defaults"],
    apex_available: ["com.android.virt"],
}

rust_test {
    name: "libtombstoned_client_rust_test",
    defaults: ["libtombstoned_client_rust_defaults"],
    require_root: true,
    test_suites: ["device-tests"],
}

genrule {
    name: "libtombstoned_client_rust_bridge_code",
    tools: ["cxxbridge"],
    cmd: "$(location cxxbridge) $(in) >> $(out)",
    srcs: ["src/lib.rs"],
    out: ["libtombstoned_client_cxx_generated.cc"],
}