// This file is generated by cargo2android.py --run --device --tests --dependencies --global_defaults=crosvm_defaults --add_workspace.

package {
    // See: http://go/android-license-faq
    // A large-scale-change added 'default_applicable_licenses' to import
    // all of the 'license_kinds' from "external_crosvm_license"
    // to get the below license kinds:
    //   SPDX-license-identifier-BSD
    default_applicable_licenses: ["external_crosvm_license"],
}

rust_defaults {
    name: "aarch64_defaults",
    defaults: ["crosvm_defaults"],
    crate_name: "aarch64",
    // has rustc warnings
    srcs: ["src/lib.rs"],
    test_suites: ["general-tests"],
    auto_gen_config: true,
    edition: "2018",
    rustlibs: [
        "libarch",
        "libbase_rust",
        "libdata_model",
        "libdevices",
        "libhypervisor",
        "libkernel_cmdline",
        "libkvm",
        "libkvm_sys",
        "liblibc",
        "libminijail_rust",
        "libresources",
        "libsync_rust",
        "libvm_control",
        "libvm_memory",
    ],
    proc_macros: ["libremain"],
    target: {
        // It is necessary to disable this specifically as well as the arch below, because
        // crosvm_defaults enables it and the more specific target apparently takes precedence over
        // the less specific arch.
        linux_glibc_x86_64: {
            enabled: false,
        },
    },
    arch: {
        x86_64: {
            enabled: false,
        },
    },
}

rust_test_host {
    name: "aarch64_host_test_src_lib",
    defaults: ["aarch64_defaults"],
    test_options: {
        unit_test: true,
    },
}

rust_test {
    name: "aarch64_device_test_src_lib",
    defaults: ["aarch64_defaults"],
}

rust_library {
    name: "libaarch64",
    defaults: ["crosvm_defaults"],
    // has rustc warnings
    host_supported: true,
    crate_name: "aarch64",
    srcs: ["src/lib.rs"],
    edition: "2018",
    rustlibs: [
        "libarch",
        "libbase_rust",
        "libdata_model",
        "libdevices",
        "libhypervisor",
        "libkernel_cmdline",
        "libkvm",
        "libkvm_sys",
        "liblibc",
        "libminijail_rust",
        "libresources",
        "libsync_rust",
        "libvm_control",
        "libvm_memory",
    ],
    proc_macros: ["libremain"],
    target: {
        // It is necessary to disable this specifically as well as the arch below, because
        // crosvm_defaults enables it and the more specific target apparently takes precedence over
        // the less specific arch.
        linux_glibc_x86_64: {
            enabled: false,
        },
    },
    arch: {
        x86_64: {
            enabled: false,
        },
    },
}

// dependent_library ["feature_list"]
//   ../../adhd/audio_streams/src/audio_streams.rs
//   ../../adhd/cras/client/cras-sys/src/lib.rs
//   ../../adhd/cras/client/libcras/src/libcras.rs
//   ../../libchromeos-rs/src/lib.rs
//   ../../minijail/rust/minijail-sys/lib.rs
//   ../../minijail/rust/minijail/src/lib.rs
//   ../../vm_tools/p9/src/lib.rs
//   ../../vm_tools/p9/wire_format_derive/wire_format_derive.rs
//   ../acpi_tables/src/lib.rs
//   ../arch/src/lib.rs
//   ../assertions/src/lib.rs
//   ../base/src/lib.rs
//   ../bit_field/bit_field_derive/bit_field_derive.rs
//   ../bit_field/src/lib.rs
//   ../cros_async/src/lib.rs
//   ../data_model/src/lib.rs
//   ../devices/src/lib.rs
//   ../disk/src/disk.rs
//   ../enumn/src/lib.rs
//   ../fuse/src/lib.rs
//   ../hypervisor/src/lib.rs
//   ../io_uring/src/lib.rs
//   ../kernel_cmdline/src/kernel_cmdline.rs
//   ../kvm/src/lib.rs
//   ../kvm_sys/src/lib.rs
//   ../linux_input_sys/src/lib.rs
//   ../net_sys/src/lib.rs
//   ../net_util/src/lib.rs
//   ../power_monitor/src/lib.rs
//   ../rand_ish/src/lib.rs
//   ../resources/src/lib.rs
//   ../rutabaga_gfx/src/lib.rs
//   ../sync/src/lib.rs
//   ../sys_util/poll_token_derive/poll_token_derive.rs
//   ../sys_util/src/lib.rs
//   ../syscall_defines/src/lib.rs
//   ../tempfile/src/lib.rs
//   ../usb_sys/src/lib.rs
//   ../usb_util/src/lib.rs
//   ../vfio_sys/src/lib.rs
//   ../vhost/src/lib.rs
//   ../virtio_sys/src/lib.rs
//   ../vm_control/src/lib.rs
//   ../vm_memory/src/lib.rs
//   async-task-4.0.3 "default,std"
//   async-trait-0.1.45
//   autocfg-1.0.1
//   base-0.1.0
//   bitflags-1.2.1 "default"
//   cfg-if-1.0.0
//   downcast-rs-1.2.0 "default,std"
//   futures-0.3.13 "alloc,async-await,default,executor,futures-executor,std"
//   futures-channel-0.3.13 "alloc,futures-sink,sink,std"
//   futures-core-0.3.13 "alloc,std"
//   futures-executor-0.3.13 "std"
//   futures-io-0.3.13 "std"
//   futures-macro-0.3.13
//   futures-sink-0.3.13 "alloc,std"
//   futures-task-0.3.13 "alloc,std"
//   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"
//   getrandom-0.2.2 "std"
//   intrusive-collections-0.9.0 "alloc,default"
//   libc-0.2.87 "default,std"
//   log-0.4.14
//   memchr-2.3.4 "default,std"
//   memoffset-0.5.6 "default"
//   paste-1.0.4
//   pin-project-lite-0.2.6
//   pin-utils-0.1.0
//   pkg-config-0.3.19
//   ppv-lite86-0.2.10 "simd,std"
//   proc-macro-hack-0.5.19
//   proc-macro-nested-0.1.7
//   proc-macro2-1.0.24 "default,proc-macro"
//   protobuf-2.22.0
//   quote-1.0.9 "default,proc-macro"
//   rand-0.8.3 "alloc,default,getrandom,libc,rand_chacha,rand_hc,std,std_rng"
//   rand_chacha-0.3.0 "std"
//   rand_core-0.6.2 "alloc,getrandom,std"
//   remain-0.2.2
//   remove_dir_all-0.5.3
//   serde-1.0.123 "default,derive,serde_derive,std"
//   serde_derive-1.0.123 "default"
//   slab-0.4.2
//   syn-1.0.61 "clone-impls,default,derive,full,parsing,printing,proc-macro,quote,visit-mut"
//   tempfile-3.2.0
//   thiserror-1.0.24
//   thiserror-impl-1.0.24
//   unicode-xid-0.2.1 "default"