blob: 578cc6853e32011f72a8c7843f7c4ef0198fca5a [file] [log] [blame]
Luke Huangb7b22db2021-05-21 08:05:50 +00001// This file is generated by cargo2android.py --config cargo2android.json.
2// Do not modify this file as changes will be overridden on upgrade.
Jeffrey Vander Stoepd802ab82020-12-08 10:32:11 +00003
Bob Badour1b19aa52021-02-12 14:49:18 -08004package {
5 default_applicable_licenses: ["external_rust_crates_quiche_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_quiche_license",
24 visibility: [":__subpackages__"],
25 license_kinds: [
26 "SPDX-license-identifier-BSD",
27 "SPDX-license-identifier-ISC",
28 "SPDX-license-identifier-OpenSSL",
29 "legacy_unencumbered",
30 ],
31 license_text: [
32 "COPYING",
33 ],
34}
35
Bernie Innocentie9e19d52020-12-10 00:05:34 +090036cc_library_headers {
37 name: "libquiche_ffi_headers",
38 export_include_dirs: ["include"],
39 apex_available: [
40 "//apex_available:platform",
41 "com.android.resolv",
42 ],
43 min_sdk_version: "29",
44}
45
Bernie Innocenti55399b52020-12-16 14:04:09 +090046rust_defaults {
47 name: "libquiche_defaults",
Bernie Innocentiead18142020-12-09 23:22:48 +090048 stem: "libquiche",
Jeffrey Vander Stoepd802ab82020-12-08 10:32:11 +000049 host_supported: true,
50 crate_name: "quiche",
51 srcs: ["src/lib.rs"],
52 edition: "2018",
53 features: [
54 "boringssl",
55 "default",
56 ],
Bernie Innocentiead18142020-12-09 23:22:48 +090057 // Link all crates statically to create a self-contained .so library.
58 rlibs: [
Jeffrey Vander Stoepd802ab82020-12-08 10:32:11 +000059 "liblazy_static",
60 "liblibc",
61 "liblibm",
62 "liblog_rust",
63 "libring",
64 ],
Bernie Innocentiead18142020-12-09 23:22:48 +090065 prefer_rlib: true,
Bernie Innocentiead18142020-12-09 23:22:48 +090066 // For DnsResolver (Mainline module introduced in Q).
Bernie Innocentiead18142020-12-09 23:22:48 +090067 apex_available: [
68 "//apex_available:platform",
69 "com.android.resolv",
70 ],
Bernie Innocentie9e19d52020-12-10 00:05:34 +090071 min_sdk_version: "29",
Jeffrey Vander Stoepd802ab82020-12-08 10:32:11 +000072}
73
Bernie Innocenti55399b52020-12-16 14:04:09 +090074rust_ffi {
75 name: "libquiche_ffi",
76 defaults: ["libquiche_defaults"],
Luke Huangb7b22db2021-05-21 08:05:50 +000077 shared_libs: [
78 "libcrypto",
79 "libssl",
80 ],
Bernie Innocenti55399b52020-12-16 14:04:09 +090081}
82
83rust_library {
84 name: "libquiche",
85 defaults: ["libquiche_defaults"],
Luke Huangb7b22db2021-05-21 08:05:50 +000086 shared_libs: [
87 "libcrypto",
88 "libssl",
89 ],
90}
91
92// This target is used by doh_unit_test to prevent compatibility issues
93// because doh_unit_test needs to be run on the R platform.
94rust_library_rlib {
95 name: "libquiche_static",
96 defaults: ["libquiche_defaults"],
97 static_libs: [
98 "libcrypto_static",
99 "libssl",
100 ],
Bernie Innocenti55399b52020-12-16 14:04:09 +0900101}
102
Jeff Vander Stoepfadb5e42021-02-05 16:24:52 +0100103rust_defaults {
104 name: "quiche_defaults",
105 crate_name: "quiche",
106 srcs: ["src/lib.rs"],
107 test_suites: ["general-tests"],
108 auto_gen_config: true,
109 edition: "2018",
110 features: [
111 "boringssl",
112 "default",
113 ],
114 rustlibs: [
115 "liblazy_static",
116 "liblibc",
117 "liblibm",
118 "liblog_rust",
119 "libmio",
120 "libring",
121 "liburl",
122 ],
Jeff Vander Stoepfadb5e42021-02-05 16:24:52 +0100123 data: [
124 "examples/cert.crt",
125 "examples/cert.key",
126 "examples/cert-big.crt",
127 "examples/rootca.crt",
128 ]
129}
130
131rust_test_host {
132 name: "quiche_host_test_src_lib",
133 defaults: ["quiche_defaults"],
134 test_options: {
135 unit_test: true,
136 },
Luke Huang9d6d0b42021-04-23 16:32:10 +0800137 shared_libs: [
138 "libcrypto",
139 "libssl",
140 ],
Jeff Vander Stoepfadb5e42021-02-05 16:24:52 +0100141}
142
143rust_test {
144 name: "quiche_device_test_src_lib",
145 defaults: ["quiche_defaults"],
Luke Huang9d6d0b42021-04-23 16:32:10 +0800146 // To run this test in R platform, it's required to statically link
147 // libcrypto and libssl.
148 static_libs: [
149 "libcrypto_static",
150 "libssl",
151 ],
Jeff Vander Stoepfadb5e42021-02-05 16:24:52 +0100152}
153
Jeffrey Vander Stoepd802ab82020-12-08 10:32:11 +0000154// dependent_library ["feature_list"]
Luke Huangb7b22db2021-05-21 08:05:50 +0000155// cc-1.0.67
Jeffrey Vander Stoepd802ab82020-12-08 10:32:11 +0000156// cfg-if-0.1.10
Jeff Vander Stoepfadb5e42021-02-05 16:24:52 +0100157// cfg-if-1.0.0
Jeffrey Vander Stoepd802ab82020-12-08 10:32:11 +0000158// cmake-0.1.45
Jeff Vander Stoepfadb5e42021-02-05 16:24:52 +0100159// idna-0.1.5
160// iovec-0.1.4
Jeffrey Vander Stoepd802ab82020-12-08 10:32:11 +0000161// lazy_static-1.4.0
Luke Huangb7b22db2021-05-21 08:05:50 +0000162// libc-0.2.94 "default,std"
Jeffrey Vander Stoepd802ab82020-12-08 10:32:11 +0000163// libm-0.2.1 "default"
Jeff Vander Stoepfadb5e42021-02-05 16:24:52 +0100164// log-0.4.14 "std"
165// matches-0.1.8
166// mio-0.6.23 "default,with-deprecated"
167// net2-0.2.37 "default,duration"
Luke Huangb7b22db2021-05-21 08:05:50 +0000168// once_cell-1.7.2 "alloc,race,std"
Jeff Vander Stoepfadb5e42021-02-05 16:24:52 +0100169// percent-encoding-1.0.1
170// ring-0.16.20 "alloc,default,dev_urandom_fallback,once_cell"
Luke Huangb7b22db2021-05-21 08:05:50 +0000171// slab-0.4.3 "default,std"
Jeffrey Vander Stoepd802ab82020-12-08 10:32:11 +0000172// spin-0.5.2
Luke Huangb7b22db2021-05-21 08:05:50 +0000173// tinyvec-1.2.0 "alloc,default,tinyvec_macros"
Jeff Vander Stoepfadb5e42021-02-05 16:24:52 +0100174// tinyvec_macros-0.1.0
Luke Huangb7b22db2021-05-21 08:05:50 +0000175// unicode-bidi-0.3.5 "default"
176// unicode-normalization-0.1.17 "default,std"
Jeffrey Vander Stoepd802ab82020-12-08 10:32:11 +0000177// untrusted-0.7.1
Jeff Vander Stoepfadb5e42021-02-05 16:24:52 +0100178// url-1.7.2