blob: 46b94a40941dab82896e9847643aa41bd92a55b0 [file] [log] [blame]
Chih-Hung Hsieh6b6c14a2020-10-30 16:48:31 -07001// This file is generated by cargo2android.py --device --run --dependencies --test --patch=patches/Android.bp.patch.
Seth Moore8cc6a242021-04-02 16:52:39 +00002// Do not modify this file as changes will be overridden on upgrade.
Chih-Hung Hsieh9a627fb2020-07-29 20:55:10 -07003
4// We renamed the shared_libs dependence from libsqlite3 to libsqlite.
Matthew Maurer5856e852020-08-10 16:31:06 -07005// srcs has been moved out of _defaults to work around b/163420435
Chih-Hung Hsieh9a627fb2020-07-29 20:55:10 -07006
Bob Badour0f6dcf72021-02-12 18:24:18 -08007package {
8 default_applicable_licenses: [
9 "external_rust_crates_libsqlite3-sys_license",
10 ],
11}
12
13// Added automatically by a large-scale-change that took the approach of
14// 'apply every license found to every target'. While this makes sure we respect
15// every license restriction, it may not be entirely correct.
16//
17// e.g. GPL in an MIT project might only apply to the contrib/ directory.
18//
19// Please consider splitting the single license below into multiple licenses,
20// taking care not to lose any license_kind information, and overriding the
21// default license using the 'licenses: [...]' property on targets as needed.
22//
23// For unused files, consider creating a 'fileGroup' with "//visibility:private"
24// to attach the license to, and including a comment whether the files may be
25// used in the current project.
26// See: http://go/android-license-faq
27license {
28 name: "external_rust_crates_libsqlite3-sys_license",
29 visibility: [":__subpackages__"],
30 license_kinds: [
31 "SPDX-license-identifier-MIT",
32 "legacy_permissive",
33 ],
34 license_text: [
35 "LICENSE",
36 ],
37}
38
Chih-Hung Hsieh9a627fb2020-07-29 20:55:10 -070039rust_library {
40 name: "liblibsqlite3_sys",
41 host_supported: true,
42 crate_name: "libsqlite3_sys",
Matthew Maurer5856e852020-08-10 16:31:06 -070043 srcs: [
44 "src/lib.rs",
45 ":libsqlite3_bindgen",
46 ],
Chih-Hung Hsieh9a627fb2020-07-29 20:55:10 -070047 edition: "2018",
Chih-Hung Hsieh9a627fb2020-07-29 20:55:10 -070048 features: [
49 "default",
50 "min_sqlite_version_3_6_8",
51 "pkg-config",
52 "vcpkg",
53 ],
54 shared_libs: [
55 "libsqlite",
56 ],
Chih-Hung Hsieh9a627fb2020-07-29 20:55:10 -070057}
58
59rust_defaults {
60 name: "libsqlite3-sys_defaults",
61 crate_name: "libsqlite3_sys",
Chih-Hung Hsieh9a627fb2020-07-29 20:55:10 -070062 test_suites: ["general-tests"],
63 auto_gen_config: true,
64 edition: "2018",
65 features: [
66 "default",
67 "min_sqlite_version_3_6_8",
68 "pkg-config",
69 "vcpkg",
70 ],
71 shared_libs: [
72 "libsqlite",
73 ],
Chih-Hung Hsieh9a627fb2020-07-29 20:55:10 -070074}
75
76rust_test_host {
77 name: "libsqlite3-sys_host_test_src_lib",
Matthew Maurer5856e852020-08-10 16:31:06 -070078 srcs: [
79 "src/lib.rs",
80 ":libsqlite3_bindgen",
81 ],
Chih-Hung Hsieh9a627fb2020-07-29 20:55:10 -070082 defaults: ["libsqlite3-sys_defaults"],
Seth Moore8cc6a242021-04-02 16:52:39 +000083 test_options: {
84 unit_test: true,
85 },
Chih-Hung Hsieh9a627fb2020-07-29 20:55:10 -070086}
87
88rust_test {
89 name: "libsqlite3-sys_device_test_src_lib",
Matthew Maurer5856e852020-08-10 16:31:06 -070090 srcs: [
91 "src/lib.rs",
92 ":libsqlite3_bindgen",
93 ],
Chih-Hung Hsieh9a627fb2020-07-29 20:55:10 -070094 defaults: ["libsqlite3-sys_defaults"],
95}
96
97// dependent_library ["feature_list"]
Chih-Hung Hsiehcc6e6352020-10-26 19:08:21 -070098// pkg-config-0.3.19
Chih-Hung Hsieh9a627fb2020-07-29 20:55:10 -070099
Matthew Maurer5856e852020-08-10 16:31:06 -0700100rust_bindgen {
101 name: "libsqlite3_bindgen",
102 host_supported: true,
103 crate_name: "sqlite3_bindgen",
104 custom_bindgen: "sqlite3_bindgen_build",
105 wrapper_src: "wrapper.h",
106 source_stem: "bindgen",
Seth Moore8cc6a242021-04-02 16:52:39 +0000107 cflags: ["-I external/sqlite/dist"],
108 defaults: ["sqlite-defaults"],
Chih-Hung Hsieh9a627fb2020-07-29 20:55:10 -0700109}