aboutsummaryrefslogtreecommitdiff
path: root/Android.bp
blob: 63b9fdd2afd16eef919d734dac66689d6edcb8d3 (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
84
85
86
87
88
89
90
91
92
// This file is generated by cargo2android.py --run --device --tests --dependencies --patch=patches/Android.bp.patch.

rust_defaults {
    name: "libchromeos-rs_defaults",
    crate_name: "libchromeos",
    srcs: ["src/lib.rs"],
    test_suites: ["general-tests"],
    auto_gen_config: true,
    edition: "2018",
    rustlibs: [
        "libdata_model",
        "libfutures",
        "libfutures_executor",
        "libfutures_util",
        "libintrusive_collections",
        "liblibc",
        "liblog_rust",
        "libprotobuf",
    ],
}

rust_test_host {
    name: "libchromeos-rs_host_test_src_lib",
    defaults: ["libchromeos-rs_defaults"],
}

rust_test {
    name: "libchromeos-rs_device_test_src_lib",
    defaults: ["libchromeos-rs_defaults"],
    // Manually limit to 64-bit to avoid depending on non-existing 32-bit build
    // of libdata_model currently.
    compile_multilib: "64",
}

rust_library {
    name: "liblibchromeos",
    host_supported: true,
    crate_name: "libchromeos",
    srcs: ["src/lib.rs"],
    edition: "2018",
    rustlibs: [
        "libdata_model",
        "libfutures",
        "libintrusive_collections",
        "liblibc",
        "liblog_rust",
        "libprotobuf",
    ],
    apex_available: [
        "//apex_available:platform",
        "com.android.virt",
    ],
    // This library depends on libdata_model that is is part of crosvm project.
    // Projects within crosvm on Android have only 64-bit target build enabled.
    // As a result, we need to manually limit this build to 64-bit only, too.
    // This is fine because this library is only used by crosvm now (thus 64-bit
    // only).
    compile_multilib: "64",
}

// dependent_library ["feature_list"]
//   ../crosvm/assertions/src/lib.rs
//   ../crosvm/data_model/src/lib.rs
//   autocfg-1.0.1
//   cfg-if-0.1.10
//   futures-0.3.8 "alloc,async-await,default,executor,futures-executor,std"
//   futures-channel-0.3.8 "alloc,futures-sink,sink,std"
//   futures-core-0.3.8 "alloc,std"
//   futures-executor-0.3.8 "default,num_cpus,std,thread-pool"
//   futures-io-0.3.8 "std"
//   futures-macro-0.3.8
//   futures-sink-0.3.8 "alloc,std"
//   futures-task-0.3.8 "alloc,once_cell,std"
//   futures-util-0.3.8 "alloc,async-await,async-await-macro,channel,default,futures-channel,futures-io,futures-macro,futures-sink,io,memchr,proc-macro-hack,proc-macro-nested,sink,slab,std"
//   intrusive-collections-0.9.0 "alloc,default"
//   libc-0.2.82 "default,std"
//   log-0.4.11
//   memchr-2.3.4 "default,std"
//   memoffset-0.5.6 "default"
//   num_cpus-1.13.0
//   once_cell-1.5.2 "alloc,std"
//   pin-project-1.0.3
//   pin-project-internal-1.0.3
//   pin-utils-0.1.0
//   proc-macro-hack-0.5.19
//   proc-macro-nested-0.1.6
//   proc-macro2-1.0.24 "default,proc-macro"
//   protobuf-2.20.0
//   quote-1.0.8 "default,proc-macro"
//   slab-0.4.2
//   syn-1.0.58 "clone-impls,default,derive,full,parsing,printing,proc-macro,quote,visit-mut"
//   unicode-xid-0.2.1 "default"