Joel Galenson | d00e1ff | 2021-04-28 09:07:25 -0700 | [diff] [blame] | 1 | // 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 Stoep | 9cd4e97 | 2020-12-04 14:20:15 +0100 | [diff] [blame] | 3 | |
Bob Badour | 1b71a85 | 2021-02-12 21:07:34 -0800 | [diff] [blame] | 4 | package { |
| 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 |
| 22 | license { |
| 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 Stoep | 9cd4e97 | 2020-12-04 14:20:15 +0100 | [diff] [blame] | 34 | rust_library { |
| 35 | name: "libspin", |
| 36 | host_supported: true, |
| 37 | crate_name: "spin", |
Joel Galenson | 710e463 | 2021-11-29 14:05:28 -0800 | [diff] [blame] | 38 | cargo_env_compat: true, |
| 39 | cargo_pkg_version: "0.9.2", |
Jeff Vander Stoep | 9cd4e97 | 2020-12-04 14:20:15 +0100 | [diff] [blame] | 40 | srcs: ["src/lib.rs"], |
| 41 | edition: "2015", |
| 42 | features: [ |
Joel Galenson | 8d7807f | 2021-06-22 10:44:01 -0700 | [diff] [blame] | 43 | "once", |
Jeff Vander Stoep | a39d048 | 2020-12-07 14:10:41 +0100 | [diff] [blame] | 44 | "std", |
Jeff Vander Stoep | 9cd4e97 | 2020-12-04 14:20:15 +0100 | [diff] [blame] | 45 | ], |
Bernie Innocenti | 60859b4 | 2020-12-14 21:11:54 +0900 | [diff] [blame] | 46 | apex_available: [ |
| 47 | "//apex_available:platform", |
Alan Stokes | f42ccee | 2021-06-21 17:49:58 +0100 | [diff] [blame] | 48 | "com.android.compos", |
Bernie Innocenti | 60859b4 | 2020-12-14 21:11:54 +0900 | [diff] [blame] | 49 | "com.android.resolv", |
Jiyong Park | 9ea9c8c | 2021-08-20 23:51:20 +0900 | [diff] [blame] | 50 | "com.android.virt", |
Bernie Innocenti | 60859b4 | 2020-12-14 21:11:54 +0900 | [diff] [blame] | 51 | ], |
| 52 | min_sdk_version: "29", |
Jeff Vander Stoep | 9cd4e97 | 2020-12-04 14:20:15 +0100 | [diff] [blame] | 53 | } |
Jeff Vander Stoep | a39d048 | 2020-12-07 14:10:41 +0100 | [diff] [blame] | 54 | |
Joel Galenson | 710e463 | 2021-11-29 14:05:28 -0800 | [diff] [blame] | 55 | rust_test { |
| 56 | name: "spin_test_src_lib", |
| 57 | host_supported: true, |
Jeff Vander Stoep | a39d048 | 2020-12-07 14:10:41 +0100 | [diff] [blame] | 58 | crate_name: "spin", |
Joel Galenson | 710e463 | 2021-11-29 14:05:28 -0800 | [diff] [blame] | 59 | cargo_env_compat: true, |
| 60 | cargo_pkg_version: "0.9.2", |
Jeff Vander Stoep | a39d048 | 2020-12-07 14:10:41 +0100 | [diff] [blame] | 61 | srcs: ["src/lib.rs"], |
| 62 | test_suites: ["general-tests"], |
| 63 | auto_gen_config: true, |
Joel Galenson | 710e463 | 2021-11-29 14:05:28 -0800 | [diff] [blame] | 64 | test_options: { |
| 65 | unit_test: true, |
| 66 | }, |
Jeff Vander Stoep | a39d048 | 2020-12-07 14:10:41 +0100 | [diff] [blame] | 67 | edition: "2015", |
| 68 | features: [ |
Joel Galenson | 8d7807f | 2021-06-22 10:44:01 -0700 | [diff] [blame] | 69 | "once", |
Jeff Vander Stoep | a39d048 | 2020-12-07 14:10:41 +0100 | [diff] [blame] | 70 | "std", |
Jeff Vander Stoep | a39d048 | 2020-12-07 14:10:41 +0100 | [diff] [blame] | 71 | ], |
| 72 | } |
| 73 | |
Andrew Walbran | 60b6576 | 2022-04-14 11:52:01 +0000 | [diff] [blame] | 74 | rust_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 Galenson | 710e463 | 2021-11-29 14:05:28 -0800 | [diff] [blame] | 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 |