blob: a1da725fa4699fcc256a5eeabd974d4fb3d7718b [file] [log] [blame]
Chih-Hung Hsieh9a627fb2020-07-29 20:55:10 -07001// This file is generated by cargo2android.py --device --run --dependencies --test.
2
3// We renamed the shared_libs dependence from libsqlite3 to libsqlite.
Matthew Maurer5856e852020-08-10 16:31:06 -07004// srcs has been moved out of _defaults to work around b/163420435
Chih-Hung Hsieh9a627fb2020-07-29 20:55:10 -07005
6rust_library {
7 name: "liblibsqlite3_sys",
8 host_supported: true,
9 crate_name: "libsqlite3_sys",
Matthew Maurer5856e852020-08-10 16:31:06 -070010 srcs: [
11 "src/lib.rs",
12 ":libsqlite3_bindgen",
13 ],
Chih-Hung Hsieh9a627fb2020-07-29 20:55:10 -070014 edition: "2018",
Chih-Hung Hsieh9a627fb2020-07-29 20:55:10 -070015 features: [
16 "default",
17 "min_sqlite_version_3_6_8",
18 "pkg-config",
19 "vcpkg",
20 ],
21 shared_libs: [
22 "libsqlite",
23 ],
Chih-Hung Hsieh9a627fb2020-07-29 20:55:10 -070024}
25
26rust_defaults {
27 name: "libsqlite3-sys_defaults",
28 crate_name: "libsqlite3_sys",
Chih-Hung Hsieh9a627fb2020-07-29 20:55:10 -070029 test_suites: ["general-tests"],
30 auto_gen_config: true,
31 edition: "2018",
32 features: [
33 "default",
34 "min_sqlite_version_3_6_8",
35 "pkg-config",
36 "vcpkg",
37 ],
38 shared_libs: [
39 "libsqlite",
40 ],
Chih-Hung Hsieh9a627fb2020-07-29 20:55:10 -070041}
42
43rust_test_host {
44 name: "libsqlite3-sys_host_test_src_lib",
Matthew Maurer5856e852020-08-10 16:31:06 -070045 srcs: [
46 "src/lib.rs",
47 ":libsqlite3_bindgen",
48 ],
Chih-Hung Hsieh9a627fb2020-07-29 20:55:10 -070049 defaults: ["libsqlite3-sys_defaults"],
50}
51
52rust_test {
53 name: "libsqlite3-sys_device_test_src_lib",
Matthew Maurer5856e852020-08-10 16:31:06 -070054 srcs: [
55 "src/lib.rs",
56 ":libsqlite3_bindgen",
57 ],
Chih-Hung Hsieh9a627fb2020-07-29 20:55:10 -070058 defaults: ["libsqlite3-sys_defaults"],
59}
60
61// dependent_library ["feature_list"]
62// pkg-config-0.3.18
63
Matthew Maurer5856e852020-08-10 16:31:06 -070064// Keep this array in sync with the cflags used in external/sqlite
65// After b/163598610 is resolved, use defaults instead.
66sqlite3_bindgen_clang_flags = [
67 " -DNDEBUG=1",
68 " -DHAVE_USLEEP=1",
69 " -DSQLITE_HAVE_ISNAN",
70 " -DSQLITE_DEFAULT_JOURNAL_SIZE_LIMIT=1048576",
71 " -DSQLITE_THREADSAFE=2",
72 " -DSQLITE_TEMP_STORE=3",
73 " -DSQLITE_POWERSAFE_OVERWRITE=1",
74 " -DSQLITE_DEFAULT_FILE_FORMAT=4",
75 " -DSQLITE_DEFAULT_AUTOVACUUM=1",
76 " -DSQLITE_ENABLE_MEMORY_MANAGEMENT=1",
77 " -DSQLITE_ENABLE_FTS3",
78 " -DSQLITE_ENABLE_FTS3_BACKWARDS",
79 " -DSQLITE_ENABLE_FTS4",
80 " -DSQLITE_OMIT_BUILTIN_TEST",
81 " -DSQLITE_OMIT_COMPILEOPTION_DIAGS",
82 " -DSQLITE_OMIT_LOAD_EXTENSION",
83 " -DSQLITE_DEFAULT_FILE_PERMISSIONS=0600",
84 " -DSQLITE_SECURE_DELETE",
85 " -DSQLITE_ENABLE_BATCH_ATOMIC_WRITE",
86 " -DBIONIC_IOCTL_NO_SIGNEDNESS_OVERLOAD",
87 " -DHAVE_POSIX_FALLOCATE=1",
Chih-Hung Hsieh9a627fb2020-07-29 20:55:10 -070088 // extra -D flags for android targets
Matthew Maurer5856e852020-08-10 16:31:06 -070089 " -DUSE_PREAD64",
90 " -Dfdatasync=fdatasync",
91 " -DHAVE_MALLOC_H=1",
92 " -DHAVE_MALLOC_USABLE_SIZE",
93 " -Wno-unused-parameter",
94]
Chih-Hung Hsieh9a627fb2020-07-29 20:55:10 -070095
Matthew Maurer5856e852020-08-10 16:31:06 -070096rust_bindgen {
97 name: "libsqlite3_bindgen",
98 host_supported: true,
99 crate_name: "sqlite3_bindgen",
100 custom_bindgen: "sqlite3_bindgen_build",
101 wrapper_src: "wrapper.h",
102 source_stem: "bindgen",
103 cflags: ["-I external/sqlite/dist"] + sqlite3_bindgen_clang_flags,
Chih-Hung Hsieh9a627fb2020-07-29 20:55:10 -0700104}