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_libc_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//
22// large-scale-change included anything that looked like it might be a license
23// text as a license_text. e.g. LICENSE, NOTICE, COPYING etc.
24//
25// Please consider removing redundant or irrelevant files from 'license_text:'.
26// http://go/android-license-faq
27license {
28    name: "external_rust_crates_libc_license",
29    visibility: [":__subpackages__"],
30    license_kinds: [
31        "SPDX-license-identifier-Apache-2.0",
32        "SPDX-license-identifier-MIT",
33    ],
34    license_text: [
35        "LICENSE-APACHE",
36        "LICENSE-MIT",
37    ],
38}
39
40rust_defaults {
41    name: "rust_libc_defaults",
42    crate_name: "libc",
43    srcs: ["src/lib.rs"],
44    test_suites: ["general-tests"],
45    auto_gen_config: true,
46    edition: "2015",
47    features: [
48        "default",
49        "extra_traits",
50        "std",
51    ],
52    cfgs: [
53        "freebsd11",
54        "libc_align",
55        "libc_cfg_target_vendor",
56        "libc_const_size_of",
57        "libc_core_cvoid",
58        "libc_packedN",
59        "libc_priv_mod_use",
60        "libc_union",
61    ],
62}
63
64rust_test_host {
65    name: "libc_host_test_src_lib",
66    defaults: ["rust_libc_defaults"],
67    test_options: {
68        unit_test: true,
69    },
70}
71
72rust_test {
73    name: "libc_device_test_src_lib",
74    defaults: ["rust_libc_defaults"],
75}
76
77rust_defaults {
78    name: "rust_libc_defaults_const_fn",
79    crate_name: "const_fn",
80    srcs: ["tests/const_fn.rs"],
81    test_suites: ["general-tests"],
82    auto_gen_config: true,
83    edition: "2015",
84    features: [
85        "default",
86        "extra_traits",
87        "std",
88    ],
89    cfgs: [
90        "freebsd11",
91        "libc_align",
92        "libc_cfg_target_vendor",
93        "libc_const_size_of",
94        "libc_core_cvoid",
95        "libc_packedN",
96        "libc_priv_mod_use",
97        "libc_union",
98    ],
99    rustlibs: [
100        "liblibc",
101    ],
102}
103
104rust_test_host {
105    name: "libc_host_test_tests_const_fn",
106    defaults: ["rust_libc_defaults_const_fn"],
107    test_options: {
108        unit_test: true,
109    },
110}
111
112rust_test {
113    name: "libc_device_test_tests_const_fn",
114    defaults: ["rust_libc_defaults_const_fn"],
115}
116
117rust_library {
118    name: "liblibc",
119    host_supported: true,
120    crate_name: "libc",
121    srcs: ["src/lib.rs"],
122    edition: "2015",
123    features: [
124        "default",
125        "extra_traits",
126        "std",
127    ],
128    cfgs: [
129        "freebsd11",
130        "libc_align",
131        "libc_cfg_target_vendor",
132        "libc_const_size_of",
133        "libc_core_cvoid",
134        "libc_packedN",
135        "libc_priv_mod_use",
136        "libc_union",
137    ],
138    apex_available: [
139        "//apex_available:platform",
140        "com.android.resolv",
141        "com.android.virt",
142    ],
143    min_sdk_version: "29",
144}
145