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