1// This file is generated by cargo2android.py --run --device --tests --dependencies --global_defaults=crosvm_defaults --add_workspace --features=gdb. 2// NOTE: The --features=gdb should be applied only to the host (not the device) and there are inline changes to achieve this 3 4package { 5 // See: http://go/android-license-faq 6 // A large-scale-change added 'default_applicable_licenses' to import 7 // all of the 'license_kinds' from "external_crosvm_license" 8 // to get the below license kinds: 9 // SPDX-license-identifier-BSD 10 default_applicable_licenses: ["external_crosvm_license"], 11} 12 13rust_library { 14 name: "libx86_64_rust", 15 defaults: ["crosvm_defaults"], 16 stem: "libx86_64", 17 host_supported: true, 18 crate_name: "x86_64", 19 srcs: ["src/lib.rs"], 20 edition: "2018", 21 target: { 22 linux_glibc_x86_64: { 23 features: [ 24 "gdb", 25 "gdbstub", 26 ], 27 rustlibs: [ 28 "libgdbstub", 29 ], 30 }, 31 }, 32 rustlibs: [ 33 "libacpi_tables", 34 "libarch", 35 "libassertions", 36 "libbase_rust", 37 "libdata_model", 38 "libdevices", 39 "libhypervisor", 40 "libkernel_cmdline", 41 "libkernel_loader", 42 "liblibc", 43 "libminijail_rust", 44 "libresources", 45 "libsync_rust", 46 "libvm_control", 47 "libvm_memory", 48 ], 49 proc_macros: ["libremain"], 50 // Exclude arm family manually 51 arch: { 52 arm: { 53 enabled: false, 54 }, 55 arm64: { 56 enabled: false, 57 }, 58 }, 59} 60 61rust_defaults { 62 name: "x86_64_defaults", 63 defaults: ["crosvm_defaults"], 64 crate_name: "x86_64", 65 srcs: ["src/lib.rs"], 66 test_suites: ["general-tests"], 67 auto_gen_config: true, 68 edition: "2018", 69 target: { 70 linux_glibc_x86_64: { 71 features: [ 72 "gdb", 73 "gdbstub", 74 ], 75 rustlibs: [ 76 "libgdbstub", 77 ], 78 }, 79 }, 80 rustlibs: [ 81 "libacpi_tables", 82 "libarch", 83 "libassertions", 84 "libbase_rust", 85 "libdata_model", 86 "libdevices", 87 "libhypervisor", 88 "libkernel_cmdline", 89 "libkernel_loader", 90 "liblibc", 91 "libminijail_rust", 92 "libresources", 93 "libsync_rust", 94 "libvm_control", 95 "libvm_memory", 96 ], 97 proc_macros: ["libremain"], 98 // Exclude arm family manually 99 arch: { 100 arm: { 101 enabled: false, 102 }, 103 arm64: { 104 enabled: false, 105 }, 106 }, 107} 108 109rust_test_host { 110 name: "x86_64_host_test_src_lib", 111 defaults: ["x86_64_defaults"], 112 test_options: { 113 unit_test: true, 114 }, 115} 116 117rust_test { 118 name: "x86_64_device_test_src_lib", 119 defaults: ["x86_64_defaults"], 120} 121 122// dependent_library ["feature_list"] 123// ../../adhd/audio_streams/src/audio_streams.rs 124// ../../adhd/cras/client/cras-sys/src/lib.rs 125// ../../adhd/cras/client/libcras/src/libcras.rs 126// ../../libchromeos-rs/src/lib.rs 127// ../../minijail/rust/minijail-sys/lib.rs 128// ../../minijail/rust/minijail/src/lib.rs 129// ../../vm_tools/p9/src/lib.rs 130// ../../vm_tools/p9/wire_format_derive/wire_format_derive.rs 131// ../acpi_tables/src/lib.rs 132// ../arch/src/lib.rs "gdb,gdbstub" 133// ../assertions/src/lib.rs 134// ../base/src/lib.rs 135// ../bit_field/bit_field_derive/bit_field_derive.rs 136// ../bit_field/src/lib.rs 137// ../cros_async/src/lib.rs 138// ../data_model/src/lib.rs 139// ../devices/src/lib.rs 140// ../disk/src/disk.rs 141// ../enumn/src/lib.rs 142// ../fuse/src/lib.rs 143// ../hypervisor/src/lib.rs 144// ../io_uring/src/lib.rs 145// ../kernel_cmdline/src/kernel_cmdline.rs 146// ../kernel_loader/src/lib.rs 147// ../kvm/src/lib.rs 148// ../kvm_sys/src/lib.rs 149// ../linux_input_sys/src/lib.rs 150// ../net_sys/src/lib.rs 151// ../net_util/src/lib.rs 152// ../power_monitor/src/lib.rs 153// ../rand_ish/src/lib.rs 154// ../resources/src/lib.rs 155// ../rutabaga_gfx/src/lib.rs 156// ../sync/src/lib.rs 157// ../sys_util/poll_token_derive/poll_token_derive.rs 158// ../sys_util/src/lib.rs 159// ../syscall_defines/src/lib.rs 160// ../tempfile/src/lib.rs 161// ../usb_sys/src/lib.rs 162// ../usb_util/src/lib.rs 163// ../vfio_sys/src/lib.rs 164// ../vhost/src/lib.rs 165// ../virtio_sys/src/lib.rs 166// ../vm_control/src/lib.rs 167// ../vm_memory/src/lib.rs 168// async-task-4.0.3 "default,std" 169// async-trait-0.1.48 170// autocfg-1.0.1 171// base-0.1.0 172// bitflags-1.2.1 "default" 173// cfg-if-0.1.10 174// cfg-if-1.0.0 175// downcast-rs-1.2.0 "default,std" 176// futures-0.3.13 "alloc,async-await,default,executor,futures-executor,std" 177// futures-channel-0.3.13 "alloc,futures-sink,sink,std" 178// futures-core-0.3.13 "alloc,std" 179// futures-executor-0.3.13 "std" 180// futures-io-0.3.13 "std" 181// futures-macro-0.3.13 182// futures-sink-0.3.13 "alloc,std" 183// futures-task-0.3.13 "alloc,std" 184// futures-util-0.3.13 "alloc,async-await,async-await-macro,channel,futures-channel,futures-io,futures-macro,futures-sink,io,memchr,proc-macro-hack,proc-macro-nested,sink,slab,std" 185// gdbstub-0.4.4 "alloc,default,std" 186// getrandom-0.2.2 "std" 187// intrusive-collections-0.9.0 "alloc,default" 188// libc-0.2.88 "default,std" 189// log-0.4.14 190// managed-0.8.0 "alloc" 191// memchr-2.3.4 "default,std" 192// memoffset-0.5.6 "default" 193// num-traits-0.2.14 194// paste-1.0.4 195// pin-project-lite-0.2.6 196// pin-utils-0.1.0 197// pkg-config-0.3.19 198// ppv-lite86-0.2.10 "simd,std" 199// proc-macro-hack-0.5.19 200// proc-macro-nested-0.1.7 201// proc-macro2-1.0.24 "default,proc-macro" 202// protobuf-2.22.0 203// quote-1.0.9 "default,proc-macro" 204// rand-0.8.3 "alloc,default,getrandom,libc,rand_chacha,rand_hc,std,std_rng" 205// rand_chacha-0.3.0 "std" 206// rand_core-0.6.2 "alloc,getrandom,std" 207// remain-0.2.2 208// remove_dir_all-0.5.3 209// serde-1.0.124 "default,derive,serde_derive,std" 210// serde_derive-1.0.124 "default" 211// slab-0.4.2 212// syn-1.0.63 "clone-impls,default,derive,full,parsing,printing,proc-macro,quote,visit-mut" 213// tempfile-3.2.0 214// thiserror-1.0.24 215// thiserror-impl-1.0.24 216// unicode-xid-0.2.1 "default" 217