1// This file is generated by cargo2android.py --run --dependencies --tests --host-first-multilib --features=default,span-locations.
2// Do not modify this file as changes will be overridden on upgrade.
3
4package {
5    default_applicable_licenses: ["external_rust_crates_proc-macro2_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// See: http://go/android-license-faq
27license {
28    name: "external_rust_crates_proc-macro2_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_library_host {
41    name: "libproc_macro2",
42    crate_name: "proc_macro2",
43    srcs: ["src/lib.rs"],
44    edition: "2018",
45    features: [
46        "default",
47        "proc-macro",
48        "span-locations",
49    ],
50    flags: [
51        "--cfg hygiene",
52        "--cfg lexerror_display",
53        "--cfg proc_macro_span",
54        "--cfg span_locations",
55        "--cfg use_proc_macro",
56        "--cfg wrap_proc_macro",
57    ],
58    rustlibs: [
59        "libunicode_xid",
60    ],
61    compile_multilib: "first",
62}
63
64rust_test_host {
65    name: "proc-macro2_host_test_src_lib",
66    crate_name: "proc_macro2",
67    srcs: ["src/lib.rs"],
68    test_suites: ["general-tests"],
69    auto_gen_config: true,
70    test_options: {
71        unit_test: true,
72    },
73    edition: "2018",
74    features: [
75        "default",
76        "proc-macro",
77        "span-locations",
78    ],
79    flags: [
80        "--cfg hygiene",
81        "--cfg lexerror_display",
82        "--cfg proc_macro_span",
83        "--cfg span_locations",
84        "--cfg use_proc_macro",
85        "--cfg wrap_proc_macro",
86    ],
87    rustlibs: [
88        "libquote",
89        "libunicode_xid",
90    ],
91}
92
93rust_defaults {
94    name: "proc-macro2_defaults",
95    crate_name: "proc_macro2",
96    test_suites: ["general-tests"],
97    auto_gen_config: true,
98    edition: "2018",
99    features: [
100        "default",
101        "proc-macro",
102        "span-locations",
103    ],
104    flags: [
105        "--cfg hygiene",
106        "--cfg lexerror_display",
107        "--cfg proc_macro_span",
108        "--cfg span_locations",
109        "--cfg use_proc_macro",
110        "--cfg wrap_proc_macro",
111    ],
112    rustlibs: [
113        "libproc_macro2",
114        "libquote",
115        "libunicode_xid",
116    ],
117}
118
119rust_test_host {
120    name: "proc-macro2_host_test_tests_comments",
121    defaults: ["proc-macro2_defaults"],
122    srcs: ["tests/comments.rs"],
123    test_options: {
124        unit_test: true,
125    },
126}
127
128rust_test_host {
129    name: "proc-macro2_host_test_tests_features",
130    defaults: ["proc-macro2_defaults"],
131    srcs: ["tests/features.rs"],
132    test_options: {
133        unit_test: true,
134    },
135}
136
137rust_test_host {
138    name: "proc-macro2_host_test_tests_marker",
139    defaults: ["proc-macro2_defaults"],
140    srcs: ["tests/marker.rs"],
141    test_options: {
142        unit_test: true,
143    },
144}
145
146rust_test_host {
147    name: "proc-macro2_host_test_tests_test",
148    defaults: ["proc-macro2_defaults"],
149    srcs: ["tests/test.rs"],
150    test_options: {
151        unit_test: true,
152    },
153}
154
155rust_test_host {
156    name: "proc-macro2_host_test_tests_test_fmt",
157    defaults: ["proc-macro2_defaults"],
158    srcs: ["tests/test_fmt.rs"],
159    test_options: {
160        unit_test: true,
161    },
162}
163
164// dependent_library ["feature_list"]
165//   proc-macro2-1.0.26
166//   quote-1.0.9
167//   unicode-xid-0.2.1 "default"
168