xref: /aosp_15_r20/external/crosvm/x86_64/Android.bp (revision bb4ee6a4ae7042d18b07a98463b9c8b875e44b39)
1// This file is generated by cargo_embargo.
2// Do not modify this file after the first "rust_*" or "genrule" module
3// because the changes will be overridden on upgrade.
4// Content before the first "rust_*" or "genrule" module is preserved.
5
6package {
7    // See: http://go/android-license-faq
8    // A large-scale-change added 'default_applicable_licenses' to import
9    // all of the 'license_kinds' from "external_crosvm_license"
10    // to get the below license kinds:
11    //   SPDX-license-identifier-BSD
12    default_applicable_licenses: ["external_crosvm_license"],
13}
14
15rust_library {
16    name: "libx86_64_rust",
17    defaults: ["crosvm_inner_defaults"],
18    host_supported: true,
19    crate_name: "x86_64",
20    cargo_env_compat: true,
21    cargo_pkg_version: "0.1.0",
22    crate_root: "src/lib.rs",
23    edition: "2021",
24    features: [
25        "gdb",
26        "gdbstub_arch",
27    ],
28    rustlibs: [
29        "libacpi_tables",
30        "libanyhow",
31        "libarch",
32        "libbase_rust",
33        "libcfg_if",
34        "libchrono",
35        "libcros_fdt",
36        "libdevices",
37        "libgdbstub_arch",
38        "libhypervisor",
39        "libjail",
40        "libkernel_cmdline",
41        "libkernel_loader",
42        "liblibc",
43        "libminijail_rust",
44        "libonce_cell",
45        "librand",
46        "libresources",
47        "libswap",
48        "libsync_rust",
49        "libthiserror",
50        "libuuid",
51        "libvm_control",
52        "libvm_memory",
53        "libzerocopy",
54    ],
55    proc_macros: ["libremain"],
56    // Exclude arm family manually
57    arch: {
58        arm: {
59            enabled: false,
60        },
61        arm64: {
62            enabled: false,
63        },
64    },
65
66}
67
68rust_test {
69    name: "x86_64_test_src_lib",
70    defaults: ["crosvm_inner_defaults"],
71    host_supported: true,
72    crate_name: "x86_64",
73    cargo_env_compat: true,
74    cargo_pkg_version: "0.1.0",
75    crate_root: "src/lib.rs",
76    test_suites: ["general-tests"],
77    auto_gen_config: true,
78    test_options: {
79        unit_test: false,
80    },
81    edition: "2021",
82    features: [
83        "gdb",
84        "gdbstub_arch",
85    ],
86    rustlibs: [
87        "libacpi_tables",
88        "libanyhow",
89        "libarch",
90        "libbase_rust",
91        "libcfg_if",
92        "libchrono",
93        "libcros_fdt",
94        "libdevices",
95        "libgdbstub_arch",
96        "libhypervisor",
97        "libjail",
98        "libkernel_cmdline",
99        "libkernel_loader",
100        "liblibc",
101        "libminijail_rust",
102        "libonce_cell",
103        "librand",
104        "libresources",
105        "libswap",
106        "libsync_rust",
107        "libthiserror",
108        "libuuid",
109        "libvm_control",
110        "libvm_memory",
111        "libzerocopy",
112    ],
113    proc_macros: ["libremain"],
114    // Exclude arm family manually
115    arch: {
116        arm: {
117            enabled: false,
118        },
119        arm64: {
120            enabled: false,
121        },
122    },
123
124}
125