1// This file is generated by cargo2android.py --run --device --features=default,secure --dependencies --patch=patches/Android.bp.patch --ignore-cargo-errors. 2// Do not modify this file as changes will be overridden on upgrade. 3 4package { 5 default_applicable_licenses: ["external_rust_crates_grpcio-sys_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_grpcio-sys_license", 24 visibility: [":__subpackages__"], 25 license_kinds: [ 26 "SPDX-license-identifier-Apache-2.0", 27 "SPDX-license-identifier-BSD", 28 "SPDX-license-identifier-ISC", 29 "SPDX-license-identifier-MIT", 30 "legacy_unencumbered", 31 ], 32 license_text: [ 33 "LICENSE", 34 ], 35} 36 37rust_library { 38 name: "libgrpcio_sys", 39 host_supported: true, 40 crate_name: "grpcio_sys", 41 srcs: [ 42 "src/lib.rs", 43 ":libgrpc_bindgen", 44 ], 45 edition: "2018", 46 features: [ 47 "bindgen", 48 "default", 49 "secure", 50 "use-bindgen", 51 ], 52 rustlibs: [ 53 "liblibc", 54 "liblibz_sys", 55 ], 56 shared_libs: [ 57 "libgrpc++", 58 "libgrpc_wrap" 59 ], 60} 61 62cc_defaults { 63 name: "libgrpcio_sys_defaults", 64 cflags: [ 65 "-DGRPC_SYS_SECURE", 66 ], 67 cpp_std: "c++11", 68 shared_libs: ["libgrpc++"], 69} 70 71cc_library { 72 name: "libgrpc_wrap", 73 defaults: ["libgrpcio_sys_defaults"], 74 host_supported: true, 75 srcs: ["grpc_wrap.cc"], 76} 77 78rust_bindgen { 79 name: "libgrpc_bindgen", 80 defaults: ["libgrpcio_sys_defaults"], 81 host_supported: true, 82 wrapper_src: "android/bindgen_wrapper.hpp", 83 source_stem: "grpc-bindings", 84 crate_name: "grpc_bindgen", 85 bindgen_flags: [ 86 "--size_t-is-usize", 87 "--constified-enum-module grpc_status_code", 88 "--default-enum-style rust", 89 "--allowlist-function=\\bgrpc_.*", 90 "--allowlist-function=\\bgpr_.*", 91 "--allowlist-function=\\bgrpcwrap_.*", 92 "--allowlist-var=\\bGRPC_.*", 93 "--allowlist-type=\\bgrpc_.*", 94 "--allowlist-type=\\bgpr_.*", 95 "--allowlist-type=\\bgrpcwrap_.*", 96 "--allowlist-type=\\bcensus_context.*", 97 "--allowlist-type=\\bverify_peer_options.*", 98 "--blocklist-type=(__)?pthread.*", 99 "--blocklist-function=\\bgpr_mu_.*", 100 "--blocklist-function=\\bgpr_cv_.*", 101 "--blocklist-function=\\bgpr_once_.*", 102 "--blocklist-type=gpr_mu", 103 "--blocklist-type=gpr_cv", 104 "--blocklist-type=gpr_once", 105 ] 106 } 107 108// dependent_library ["feature_list"] 109// bindgen-0.57.0 "runtime" 110// bitflags-1.2.1 "default" 111// boringssl-src-0.2.0 112// cc-1.0.67 113// cexpr-0.4.0 114// cfg-if-1.0.0 115// clang-sys-1.2.0 "clang_3_5,clang_3_6,clang_3_7,clang_3_8,clang_3_9,clang_4_0,clang_5_0,clang_6_0,libloading,runtime" 116// cmake-0.1.45 117// glob-0.3.0 118// lazy_static-1.4.0 119// lazycell-1.3.0 120// libc-0.2.93 "default,std" 121// libloading-0.7.0 122// libz-sys-1.1.2 "default,libc,static,stock-zlib" 123// memchr-2.3.4 "std,use_std" 124// nom-5.1.2 "alloc,std" 125// peeking_take_while-0.1.2 126// pkg-config-0.3.19 127// proc-macro2-1.0.26 128// quote-1.0.9 129// regex-1.4.5 "std,unicode,unicode-age,unicode-bool,unicode-case,unicode-gencat,unicode-perl,unicode-script,unicode-segment" 130// regex-syntax-0.6.23 "unicode,unicode-age,unicode-bool,unicode-case,unicode-gencat,unicode-perl,unicode-script,unicode-segment" 131// rustc-hash-1.1.0 "default,std" 132// same-file-1.0.6 133// shlex-0.1.1 134// unicode-xid-0.2.1 "default" 135// version_check-0.9.3 136// walkdir-2.3.2 137