Luke Huang | b7b22db | 2021-05-21 08:05:50 +0000 | [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. |
Jeffrey Vander Stoep | d802ab8 | 2020-12-08 10:32:11 +0000 | [diff] [blame] | 3 | |
Bob Badour | 1b19aa5 | 2021-02-12 14:49:18 -0800 | [diff] [blame] | 4 | package { |
| 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 |
| 22 | license { |
| 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 Innocenti | e9e19d5 | 2020-12-10 00:05:34 +0900 | [diff] [blame] | 36 | cc_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 Innocenti | 55399b5 | 2020-12-16 14:04:09 +0900 | [diff] [blame] | 46 | rust_defaults { |
| 47 | name: "libquiche_defaults", |
Bernie Innocenti | ead1814 | 2020-12-09 23:22:48 +0900 | [diff] [blame] | 48 | stem: "libquiche", |
Jeffrey Vander Stoep | d802ab8 | 2020-12-08 10:32:11 +0000 | [diff] [blame] | 49 | host_supported: true, |
| 50 | crate_name: "quiche", |
| 51 | srcs: ["src/lib.rs"], |
| 52 | edition: "2018", |
| 53 | features: [ |
| 54 | "boringssl", |
| 55 | "default", |
| 56 | ], |
Bernie Innocenti | ead1814 | 2020-12-09 23:22:48 +0900 | [diff] [blame] | 57 | // Link all crates statically to create a self-contained .so library. |
| 58 | rlibs: [ |
Jeffrey Vander Stoep | d802ab8 | 2020-12-08 10:32:11 +0000 | [diff] [blame] | 59 | "liblazy_static", |
| 60 | "liblibc", |
| 61 | "liblibm", |
| 62 | "liblog_rust", |
| 63 | "libring", |
| 64 | ], |
Bernie Innocenti | ead1814 | 2020-12-09 23:22:48 +0900 | [diff] [blame] | 65 | prefer_rlib: true, |
Bernie Innocenti | ead1814 | 2020-12-09 23:22:48 +0900 | [diff] [blame] | 66 | // For DnsResolver (Mainline module introduced in Q). |
Bernie Innocenti | ead1814 | 2020-12-09 23:22:48 +0900 | [diff] [blame] | 67 | apex_available: [ |
| 68 | "//apex_available:platform", |
| 69 | "com.android.resolv", |
| 70 | ], |
Bernie Innocenti | e9e19d5 | 2020-12-10 00:05:34 +0900 | [diff] [blame] | 71 | min_sdk_version: "29", |
Jeffrey Vander Stoep | d802ab8 | 2020-12-08 10:32:11 +0000 | [diff] [blame] | 72 | } |
| 73 | |
Bernie Innocenti | 55399b5 | 2020-12-16 14:04:09 +0900 | [diff] [blame] | 74 | rust_ffi { |
| 75 | name: "libquiche_ffi", |
| 76 | defaults: ["libquiche_defaults"], |
Luke Huang | b7b22db | 2021-05-21 08:05:50 +0000 | [diff] [blame] | 77 | shared_libs: [ |
| 78 | "libcrypto", |
| 79 | "libssl", |
| 80 | ], |
Bernie Innocenti | 55399b5 | 2020-12-16 14:04:09 +0900 | [diff] [blame] | 81 | } |
| 82 | |
| 83 | rust_library { |
| 84 | name: "libquiche", |
| 85 | defaults: ["libquiche_defaults"], |
Luke Huang | b7b22db | 2021-05-21 08:05:50 +0000 | [diff] [blame] | 86 | 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. |
| 94 | rust_library_rlib { |
| 95 | name: "libquiche_static", |
| 96 | defaults: ["libquiche_defaults"], |
| 97 | static_libs: [ |
| 98 | "libcrypto_static", |
| 99 | "libssl", |
| 100 | ], |
Bernie Innocenti | 55399b5 | 2020-12-16 14:04:09 +0900 | [diff] [blame] | 101 | } |
| 102 | |
Jeff Vander Stoep | fadb5e4 | 2021-02-05 16:24:52 +0100 | [diff] [blame] | 103 | rust_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 Stoep | fadb5e4 | 2021-02-05 16:24:52 +0100 | [diff] [blame] | 123 | data: [ |
| 124 | "examples/cert.crt", |
| 125 | "examples/cert.key", |
| 126 | "examples/cert-big.crt", |
| 127 | "examples/rootca.crt", |
| 128 | ] |
| 129 | } |
| 130 | |
| 131 | rust_test_host { |
| 132 | name: "quiche_host_test_src_lib", |
| 133 | defaults: ["quiche_defaults"], |
| 134 | test_options: { |
| 135 | unit_test: true, |
| 136 | }, |
Luke Huang | 9d6d0b4 | 2021-04-23 16:32:10 +0800 | [diff] [blame] | 137 | shared_libs: [ |
| 138 | "libcrypto", |
| 139 | "libssl", |
| 140 | ], |
Jeff Vander Stoep | fadb5e4 | 2021-02-05 16:24:52 +0100 | [diff] [blame] | 141 | } |
| 142 | |
| 143 | rust_test { |
| 144 | name: "quiche_device_test_src_lib", |
| 145 | defaults: ["quiche_defaults"], |
Luke Huang | 9d6d0b4 | 2021-04-23 16:32:10 +0800 | [diff] [blame] | 146 | // 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 Stoep | fadb5e4 | 2021-02-05 16:24:52 +0100 | [diff] [blame] | 152 | } |
| 153 | |
Jeffrey Vander Stoep | d802ab8 | 2020-12-08 10:32:11 +0000 | [diff] [blame] | 154 | // dependent_library ["feature_list"] |
Luke Huang | b7b22db | 2021-05-21 08:05:50 +0000 | [diff] [blame] | 155 | // cc-1.0.67 |
Jeffrey Vander Stoep | d802ab8 | 2020-12-08 10:32:11 +0000 | [diff] [blame] | 156 | // cfg-if-0.1.10 |
Jeff Vander Stoep | fadb5e4 | 2021-02-05 16:24:52 +0100 | [diff] [blame] | 157 | // cfg-if-1.0.0 |
Jeffrey Vander Stoep | d802ab8 | 2020-12-08 10:32:11 +0000 | [diff] [blame] | 158 | // cmake-0.1.45 |
Jeff Vander Stoep | fadb5e4 | 2021-02-05 16:24:52 +0100 | [diff] [blame] | 159 | // idna-0.1.5 |
| 160 | // iovec-0.1.4 |
Jeffrey Vander Stoep | d802ab8 | 2020-12-08 10:32:11 +0000 | [diff] [blame] | 161 | // lazy_static-1.4.0 |
Luke Huang | b7b22db | 2021-05-21 08:05:50 +0000 | [diff] [blame] | 162 | // libc-0.2.94 "default,std" |
Jeffrey Vander Stoep | d802ab8 | 2020-12-08 10:32:11 +0000 | [diff] [blame] | 163 | // libm-0.2.1 "default" |
Jeff Vander Stoep | fadb5e4 | 2021-02-05 16:24:52 +0100 | [diff] [blame] | 164 | // 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 Huang | b7b22db | 2021-05-21 08:05:50 +0000 | [diff] [blame] | 168 | // once_cell-1.7.2 "alloc,race,std" |
Jeff Vander Stoep | fadb5e4 | 2021-02-05 16:24:52 +0100 | [diff] [blame] | 169 | // percent-encoding-1.0.1 |
| 170 | // ring-0.16.20 "alloc,default,dev_urandom_fallback,once_cell" |
Luke Huang | b7b22db | 2021-05-21 08:05:50 +0000 | [diff] [blame] | 171 | // slab-0.4.3 "default,std" |
Jeffrey Vander Stoep | d802ab8 | 2020-12-08 10:32:11 +0000 | [diff] [blame] | 172 | // spin-0.5.2 |
Luke Huang | b7b22db | 2021-05-21 08:05:50 +0000 | [diff] [blame] | 173 | // tinyvec-1.2.0 "alloc,default,tinyvec_macros" |
Jeff Vander Stoep | fadb5e4 | 2021-02-05 16:24:52 +0100 | [diff] [blame] | 174 | // tinyvec_macros-0.1.0 |
Luke Huang | b7b22db | 2021-05-21 08:05:50 +0000 | [diff] [blame] | 175 | // unicode-bidi-0.3.5 "default" |
| 176 | // unicode-normalization-0.1.17 "default,std" |
Jeffrey Vander Stoep | d802ab8 | 2020-12-08 10:32:11 +0000 | [diff] [blame] | 177 | // untrusted-0.7.1 |
Jeff Vander Stoep | fadb5e4 | 2021-02-05 16:24:52 +0100 | [diff] [blame] | 178 | // url-1.7.2 |