• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// This file is generated by cargo_embargo.
2// Do not modify this file after the first "rust_*" or "genrule" module
3// because the changes will be overridden on upgrade.
4// Content before the first "rust_*" or "genrule" module is preserved.
5
6// We renamed the shared_libs dependence from libsqlite3 to libsqlite.
7// srcs has been moved out of _defaults to work around b/163420435
8
9package {
10    default_applicable_licenses: [
11        "external_rust_crates_libsqlite3-sys_license",
12    ],
13}
14
15// Added automatically by a large-scale-change that took the approach of
16// 'apply every license found to every target'. While this makes sure we respect
17// every license restriction, it may not be entirely correct.
18//
19// e.g. GPL in an MIT project might only apply to the contrib/ directory.
20//
21// Please consider splitting the single license below into multiple licenses,
22// taking care not to lose any license_kind information, and overriding the
23// default license using the 'licenses: [...]' property on targets as needed.
24//
25// For unused files, consider creating a 'fileGroup' with "//visibility:private"
26// to attach the license to, and including a comment whether the files may be
27// used in the current project.
28// See: http://go/android-license-faq
29license {
30    name: "external_rust_crates_libsqlite3-sys_license",
31    visibility: [":__subpackages__"],
32    license_kinds: [
33        "SPDX-license-identifier-MIT",
34        "legacy_permissive",
35    ],
36    license_text: [
37        "LICENSE",
38    ],
39}
40
41rust_library {
42    name: "liblibsqlite3_sys",
43    host_supported: true,
44    crate_name: "libsqlite3_sys",
45    cargo_env_compat: true,
46    cargo_pkg_version: "0.22.2",
47    crate_root: "src/lib.rs",
48    srcs: [":libsqlite3_bindgen"],
49    edition: "2018",
50    features: [
51        "default",
52        "min_sqlite_version_3_6_8",
53        "pkg-config",
54        "vcpkg",
55    ],
56    shared_libs: ["libsqlite"],
57    apex_available: [
58        "//apex_available:platform",
59        "//apex_available:anyapex",
60    ],
61}
62
63rust_test {
64    name: "libsqlite3-sys_test_src_lib",
65    host_supported: true,
66    crate_name: "libsqlite3_sys",
67    cargo_env_compat: true,
68    cargo_pkg_version: "0.22.2",
69    crate_root: "src/lib.rs",
70    srcs: [":libsqlite3_bindgen"],
71    test_suites: ["general-tests"],
72    auto_gen_config: true,
73    test_options: {
74        unit_test: true,
75    },
76    edition: "2018",
77    features: [
78        "default",
79        "min_sqlite_version_3_6_8",
80        "pkg-config",
81        "vcpkg",
82    ],
83    shared_libs: ["libsqlite"],
84}
85
86rust_bindgen {
87    name: "libsqlite3_bindgen",
88    host_supported: true,
89    crate_name: "sqlite3_bindgen",
90    custom_bindgen: "sqlite3_bindgen_build",
91    wrapper_src: "wrapper.h",
92    source_stem: "bindgen",
93    header_libs: ["libsqlite"],
94    defaults: ["sqlite-defaults"],
95    apex_available: [
96        "//apex_available:platform",
97        "//apex_available:anyapex",
98    ],
99}
100
101rust_test {
102    name: "libsqlite3_bindgen_test",
103    srcs: [":libsqlite3_bindgen"],
104    crate_name: "sqlite3_bindgen_test",
105    test_suites: ["general-tests"],
106    auto_gen_config: true,
107    clippy_lints: "none",
108    lints: "none",
109}
110