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_bindgen_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_bindgen_license", 24 visibility: [":__subpackages__"], 25 license_kinds: [ 26 "SPDX-license-identifier-Apache-2.0", 27 "SPDX-license-identifier-BSD", 28 ], 29 license_text: [ 30 "LICENSE", 31 ], 32} 33 34genrule { 35 name: "copy_bindgen_build_out", 36 srcs: ["out/*"], 37 cmd: "cp $(in) $(genDir)", 38 out: [ 39 "host-target.txt", 40 "tests.rs", 41 ], 42} 43 44rust_binary_host { 45 name: "bindgen", 46 // has rustc warnings 47 crate_name: "bindgen", 48 cargo_env_compat: true, 49 cargo_pkg_version: "0.59.2", 50 srcs: [ 51 "src/main.rs", 52 ":copy_bindgen_build_out", 53 ], 54 edition: "2018", 55 features: [ 56 "clap", 57 "runtime", 58 "which", 59 "which-rustfmt", 60 ], 61 rustlibs: [ 62 "libbindgen", 63 "libbitflags", 64 "libcexpr", 65 "libclang_sys", 66 "libclap", 67 "liblazy_static", 68 "liblazycell", 69 "libpeeking_take_while", 70 "libproc_macro2", 71 "libquote", 72 "libregex", 73 "librustc_hash", 74 "libshlex", 75 "libwhich", 76 ], 77 compile_multilib: "first", 78} 79 80rust_library_host { 81 name: "libbindgen", 82 // has rustc warnings 83 crate_name: "bindgen", 84 cargo_env_compat: true, 85 cargo_pkg_version: "0.59.2", 86 srcs: [ 87 "src/lib.rs", 88 ":copy_bindgen_build_out", 89 ], 90 edition: "2018", 91 features: [ 92 "clap", 93 "runtime", 94 "which", 95 "which-rustfmt", 96 ], 97 rustlibs: [ 98 "libbitflags", 99 "libcexpr", 100 "libclang_sys", 101 "libclap", 102 "liblazy_static", 103 "liblazycell", 104 "libpeeking_take_while", 105 "libproc_macro2", 106 "libquote", 107 "libregex", 108 "librustc_hash", 109 "libshlex", 110 "libwhich", 111 ], 112 compile_multilib: "first", 113} 114