• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// This file is generated by cargo2android.py --config cargo2android.json.
2// Do not modify this file as changes will be overridden on upgrade.
3
4package {
5    default_applicable_licenses: ["external_rust_crates_spin_license"],
6}
7
8// Added automatically by a large-scale-change that took the approach of
9// 'apply every license found to every target'. While this makes sure we respect
10// every license restriction, it may not be entirely correct.
11//
12// e.g. GPL in an MIT project might only apply to the contrib/ directory.
13//
14// Please consider splitting the single license below into multiple licenses,
15// taking care not to lose any license_kind information, and overriding the
16// default license using the 'licenses: [...]' property on targets as needed.
17//
18// For unused files, consider creating a 'fileGroup' with "//visibility:private"
19// to attach the license to, and including a comment whether the files may be
20// used in the current project.
21// See: http://go/android-license-faq
22license {
23    name: "external_rust_crates_spin_license",
24    visibility: [":__subpackages__"],
25    license_kinds: [
26        "SPDX-license-identifier-Apache-2.0",
27        "SPDX-license-identifier-MIT",
28    ],
29    license_text: [
30        "LICENSE",
31    ],
32}
33
34rust_library {
35    name: "libspin",
36    host_supported: true,
37    crate_name: "spin",
38    cargo_env_compat: true,
39    cargo_pkg_version: "0.9.2",
40    srcs: ["src/lib.rs"],
41    edition: "2015",
42    features: [
43        "once",
44        "std",
45    ],
46    apex_available: [
47        "//apex_available:platform",
48        "com.android.compos",
49        "com.android.resolv",
50        "com.android.virt",
51    ],
52    min_sdk_version: "29",
53}
54
55rust_test {
56    name: "spin_test_src_lib",
57    host_supported: true,
58    crate_name: "spin",
59    cargo_env_compat: true,
60    cargo_pkg_version: "0.9.2",
61    srcs: ["src/lib.rs"],
62    test_suites: ["general-tests"],
63    auto_gen_config: true,
64    test_options: {
65        unit_test: true,
66    },
67    edition: "2015",
68    features: [
69        "once",
70        "std",
71    ],
72}
73
74rust_library_rlib {
75    name: "libspin_nostd",
76    host_supported: true,
77    crate_name: "spin",
78    cargo_env_compat: true,
79    cargo_pkg_version: "0.9.2",
80    srcs: ["src/lib.rs"],
81    edition: "2015",
82    features: [
83        "mutex",
84        "spin_mutex",
85    ],
86    apex_available: [
87        "//apex_available:platform",
88        "com.android.virt",
89    ],
90    min_sdk_version: "29",
91}
92
93
94// Errors when listing tests:
95// error[E0433]: failed to resolve: could not find `Mutex` in `spin`
96// error[E0433]: failed to resolve: could not find `RwLock` in `spin`
97// error: could not compile `spin` due to 2 previous errors
98// error: build failed
99