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 srcs: ["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 "libmemoffset", 44 "libminijail_rust", 45 "libonce_cell", 46 "librand", 47 "libresources", 48 "libswap", 49 "libsync_rust", 50 "libthiserror", 51 "libuuid", 52 "libvm_control", 53 "libvm_memory", 54 "libzerocopy", 55 ], 56 proc_macros: ["libremain"], 57 // Exclude arm family manually 58 arch: { 59 arm: { 60 enabled: false, 61 }, 62 arm64: { 63 enabled: false, 64 }, 65 }, 66 67} 68 69rust_test { 70 name: "x86_64_test_src_lib", 71 defaults: ["crosvm_inner_defaults"], 72 host_supported: true, 73 crate_name: "x86_64", 74 cargo_env_compat: true, 75 cargo_pkg_version: "0.1.0", 76 srcs: ["src/lib.rs"], 77 test_suites: ["general-tests"], 78 auto_gen_config: true, 79 test_options: { 80 unit_test: false, 81 }, 82 edition: "2021", 83 features: [ 84 "gdb", 85 "gdbstub_arch", 86 ], 87 rustlibs: [ 88 "libacpi_tables", 89 "libanyhow", 90 "libarch", 91 "libbase_rust", 92 "libcfg_if", 93 "libchrono", 94 "libcros_fdt", 95 "libdevices", 96 "libgdbstub_arch", 97 "libhypervisor", 98 "libjail", 99 "libkernel_cmdline", 100 "libkernel_loader", 101 "liblibc", 102 "libmemoffset", 103 "libminijail_rust", 104 "libonce_cell", 105 "librand", 106 "libresources", 107 "libswap", 108 "libsync_rust", 109 "libthiserror", 110 "libuuid", 111 "libvm_control", 112 "libvm_memory", 113 "libzerocopy", 114 ], 115 proc_macros: ["libremain"], 116 // Exclude arm family manually 117 arch: { 118 arm: { 119 enabled: false, 120 }, 121 arm64: { 122 enabled: false, 123 }, 124 }, 125 126} 127 128rust_test { 129 name: "x86_64_test_tests_integration_main", 130 defaults: ["crosvm_inner_defaults"], 131 host_supported: true, 132 crate_name: "integration", 133 cargo_env_compat: true, 134 cargo_pkg_version: "0.1.0", 135 srcs: ["tests/integration/main.rs"], 136 test_suites: ["general-tests"], 137 auto_gen_config: true, 138 test_options: { 139 unit_test: false, 140 }, 141 edition: "2021", 142 features: [ 143 "gdb", 144 "gdbstub_arch", 145 ], 146 rustlibs: [ 147 "libacpi_tables", 148 "libanyhow", 149 "libarch", 150 "libbase_rust", 151 "libcfg_if", 152 "libchrono", 153 "libcros_fdt", 154 "libdevices", 155 "libgdbstub_arch", 156 "libhypervisor", 157 "libjail", 158 "libkernel_cmdline", 159 "libkernel_loader", 160 "liblibc", 161 "libmemoffset", 162 "libminijail_rust", 163 "libonce_cell", 164 "librand", 165 "libresources", 166 "libswap", 167 "libsync_rust", 168 "libthiserror", 169 "libuuid", 170 "libvm_control", 171 "libvm_memory", 172 "libx86_64_rust", 173 "libzerocopy", 174 ], 175 proc_macros: ["libremain"], 176 // Exclude arm family manually 177 arch: { 178 arm: { 179 enabled: false, 180 }, 181 arm64: { 182 enabled: false, 183 }, 184 }, 185 186} 187 188rust_test { 189 name: "x86_64_test_tests_linux", 190 defaults: ["crosvm_inner_defaults"], 191 host_supported: true, 192 crate_name: "linux", 193 cargo_env_compat: true, 194 cargo_pkg_version: "0.1.0", 195 srcs: ["tests/linux.rs"], 196 test_suites: ["general-tests"], 197 auto_gen_config: true, 198 test_options: { 199 unit_test: false, 200 }, 201 edition: "2021", 202 features: [ 203 "gdb", 204 "gdbstub_arch", 205 ], 206 rustlibs: [ 207 "libacpi_tables", 208 "libanyhow", 209 "libarch", 210 "libbase_rust", 211 "libcfg_if", 212 "libchrono", 213 "libcros_fdt", 214 "libdevices", 215 "libgdbstub_arch", 216 "libhypervisor", 217 "libjail", 218 "libkernel_cmdline", 219 "libkernel_loader", 220 "liblibc", 221 "libmemoffset", 222 "libminijail_rust", 223 "libonce_cell", 224 "librand", 225 "libresources", 226 "libswap", 227 "libsync_rust", 228 "libthiserror", 229 "libuuid", 230 "libvm_control", 231 "libvm_memory", 232 "libx86_64_rust", 233 "libzerocopy", 234 ], 235 proc_macros: ["libremain"], 236 // Exclude arm family manually 237 arch: { 238 arm: { 239 enabled: false, 240 }, 241 arm64: { 242 enabled: false, 243 }, 244 }, 245 246} 247