blob: 6d0e88c2ccc04ae593661f0b7444062a069c0f7a [file] [log] [blame]
Joel Galensond00e1ff2021-04-28 09:07:25 -07001// This file is generated by cargo2android.py --config cargo2android.json.
2// Do not modify this file as changes will be overridden on upgrade.
Jeff Vander Stoep9cd4e972020-12-04 14:20:15 +01003
Bob Badour1b71a852021-02-12 21:07:34 -08004package {
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
Jeff Vander Stoep9cd4e972020-12-04 14:20:15 +010034rust_library {
35 name: "libspin",
36 host_supported: true,
37 crate_name: "spin",
Joel Galenson710e4632021-11-29 14:05:28 -080038 cargo_env_compat: true,
39 cargo_pkg_version: "0.9.2",
Jeff Vander Stoep9cd4e972020-12-04 14:20:15 +010040 srcs: ["src/lib.rs"],
41 edition: "2015",
42 features: [
Joel Galenson8d7807f2021-06-22 10:44:01 -070043 "once",
Jeff Vander Stoepa39d0482020-12-07 14:10:41 +010044 "std",
Jeff Vander Stoep9cd4e972020-12-04 14:20:15 +010045 ],
Bernie Innocenti60859b42020-12-14 21:11:54 +090046 apex_available: [
47 "//apex_available:platform",
Alan Stokesf42ccee2021-06-21 17:49:58 +010048 "com.android.compos",
Bernie Innocenti60859b42020-12-14 21:11:54 +090049 "com.android.resolv",
Jiyong Park9ea9c8c2021-08-20 23:51:20 +090050 "com.android.virt",
Bernie Innocenti60859b42020-12-14 21:11:54 +090051 ],
52 min_sdk_version: "29",
Jeff Vander Stoep9cd4e972020-12-04 14:20:15 +010053}
Jeff Vander Stoepa39d0482020-12-07 14:10:41 +010054
Joel Galenson710e4632021-11-29 14:05:28 -080055rust_test {
56 name: "spin_test_src_lib",
57 host_supported: true,
Jeff Vander Stoepa39d0482020-12-07 14:10:41 +010058 crate_name: "spin",
Joel Galenson710e4632021-11-29 14:05:28 -080059 cargo_env_compat: true,
60 cargo_pkg_version: "0.9.2",
Jeff Vander Stoepa39d0482020-12-07 14:10:41 +010061 srcs: ["src/lib.rs"],
62 test_suites: ["general-tests"],
63 auto_gen_config: true,
Joel Galenson710e4632021-11-29 14:05:28 -080064 test_options: {
65 unit_test: true,
66 },
Jeff Vander Stoepa39d0482020-12-07 14:10:41 +010067 edition: "2015",
68 features: [
Joel Galenson8d7807f2021-06-22 10:44:01 -070069 "once",
Jeff Vander Stoepa39d0482020-12-07 14:10:41 +010070 "std",
Jeff Vander Stoepa39d0482020-12-07 14:10:41 +010071 ],
72}
73
Andrew Walbran60b65762022-04-14 11:52:01 +000074rust_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
Joel Galenson710e4632021-11-29 14:05:28 -080094// 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