Chih-Hung Hsieh | 6b6c14a | 2020-10-30 16:48:31 -0700 | [diff] [blame] | 1 | // This file is generated by cargo2android.py --device --run --dependencies --test --patch=patches/Android.bp.patch. |
Seth Moore | 8cc6a24 | 2021-04-02 16:52:39 +0000 | [diff] [blame] | 2 | // Do not modify this file as changes will be overridden on upgrade. |
Chih-Hung Hsieh | 9a627fb | 2020-07-29 20:55:10 -0700 | [diff] [blame] | 3 | |
| 4 | // We renamed the shared_libs dependence from libsqlite3 to libsqlite. |
Matthew Maurer | 5856e85 | 2020-08-10 16:31:06 -0700 | [diff] [blame] | 5 | // srcs has been moved out of _defaults to work around b/163420435 |
Chih-Hung Hsieh | 9a627fb | 2020-07-29 20:55:10 -0700 | [diff] [blame] | 6 | |
Bob Badour | 0f6dcf7 | 2021-02-12 18:24:18 -0800 | [diff] [blame] | 7 | package { |
| 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 |
| 27 | license { |
| 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 Hsieh | 9a627fb | 2020-07-29 20:55:10 -0700 | [diff] [blame] | 39 | rust_library { |
| 40 | name: "liblibsqlite3_sys", |
| 41 | host_supported: true, |
| 42 | crate_name: "libsqlite3_sys", |
Matthew Maurer | 5856e85 | 2020-08-10 16:31:06 -0700 | [diff] [blame] | 43 | srcs: [ |
| 44 | "src/lib.rs", |
| 45 | ":libsqlite3_bindgen", |
| 46 | ], |
Chih-Hung Hsieh | 9a627fb | 2020-07-29 20:55:10 -0700 | [diff] [blame] | 47 | edition: "2018", |
Chih-Hung Hsieh | 9a627fb | 2020-07-29 20:55:10 -0700 | [diff] [blame] | 48 | features: [ |
| 49 | "default", |
| 50 | "min_sqlite_version_3_6_8", |
| 51 | "pkg-config", |
| 52 | "vcpkg", |
| 53 | ], |
| 54 | shared_libs: [ |
| 55 | "libsqlite", |
| 56 | ], |
Chih-Hung Hsieh | 9a627fb | 2020-07-29 20:55:10 -0700 | [diff] [blame] | 57 | } |
| 58 | |
| 59 | rust_defaults { |
| 60 | name: "libsqlite3-sys_defaults", |
| 61 | crate_name: "libsqlite3_sys", |
Chih-Hung Hsieh | 9a627fb | 2020-07-29 20:55:10 -0700 | [diff] [blame] | 62 | 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 Hsieh | 9a627fb | 2020-07-29 20:55:10 -0700 | [diff] [blame] | 74 | } |
| 75 | |
| 76 | rust_test_host { |
| 77 | name: "libsqlite3-sys_host_test_src_lib", |
Matthew Maurer | 5856e85 | 2020-08-10 16:31:06 -0700 | [diff] [blame] | 78 | srcs: [ |
| 79 | "src/lib.rs", |
| 80 | ":libsqlite3_bindgen", |
| 81 | ], |
Chih-Hung Hsieh | 9a627fb | 2020-07-29 20:55:10 -0700 | [diff] [blame] | 82 | defaults: ["libsqlite3-sys_defaults"], |
Seth Moore | 8cc6a24 | 2021-04-02 16:52:39 +0000 | [diff] [blame] | 83 | test_options: { |
| 84 | unit_test: true, |
| 85 | }, |
Chih-Hung Hsieh | 9a627fb | 2020-07-29 20:55:10 -0700 | [diff] [blame] | 86 | } |
| 87 | |
| 88 | rust_test { |
| 89 | name: "libsqlite3-sys_device_test_src_lib", |
Matthew Maurer | 5856e85 | 2020-08-10 16:31:06 -0700 | [diff] [blame] | 90 | srcs: [ |
| 91 | "src/lib.rs", |
| 92 | ":libsqlite3_bindgen", |
| 93 | ], |
Chih-Hung Hsieh | 9a627fb | 2020-07-29 20:55:10 -0700 | [diff] [blame] | 94 | defaults: ["libsqlite3-sys_defaults"], |
| 95 | } |
| 96 | |
| 97 | // dependent_library ["feature_list"] |
Chih-Hung Hsieh | cc6e635 | 2020-10-26 19:08:21 -0700 | [diff] [blame] | 98 | // pkg-config-0.3.19 |
Chih-Hung Hsieh | 9a627fb | 2020-07-29 20:55:10 -0700 | [diff] [blame] | 99 | |
Matthew Maurer | 5856e85 | 2020-08-10 16:31:06 -0700 | [diff] [blame] | 100 | rust_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 Moore | 8cc6a24 | 2021-04-02 16:52:39 +0000 | [diff] [blame] | 107 | cflags: ["-I external/sqlite/dist"], |
| 108 | defaults: ["sqlite-defaults"], |
Chih-Hung Hsieh | 9a627fb | 2020-07-29 20:55:10 -0700 | [diff] [blame] | 109 | } |