• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1package {
2    default_applicable_licenses: ["external_sqlite_android_license"],
3}
4
5// Added automatically by a large-scale-change
6// See: http://go/android-license-faq
7license {
8    name: "external_sqlite_android_license",
9    visibility: [":__subpackages__"],
10    license_kinds: [
11        "SPDX-license-identifier-Apache-2.0",
12    ],
13    license_text: [
14        "NOTICE",
15    ],
16}
17
18cc_defaults {
19    name: "libsqlite3_android_defaults",
20    host_supported: true,
21    cflags: [
22        "-Wall",
23        "-Werror",
24        "-Wno-unused-function",
25        "-Wno-unused-variable",
26    ],
27    srcs: [
28        "PhoneNumberUtils.cpp",
29        "OldPhoneNumberUtils.cpp",
30        "sqlite3_android.cpp",
31    ],
32    include_dirs: ["external/sqlite/dist"],
33    shared_libs: [
34        "liblog",
35    ],
36    export_include_dirs: ["."],
37}
38
39cc_library_static {
40    name: "libsqlite3_android",
41    defaults: ["libsqlite3_android_defaults"],
42    vendor_available: true,
43    native_bridge_supported: true,
44    target: {
45        android: {
46            cflags: [
47                    "-DSQLITE_ENABLE_ICU",
48                    "-DSQLITE_DEFAULT_LEGACY_ALTER_TABLE",
49            ],
50            shared_libs: [
51                "libandroidicu",
52            ],
53        },
54        host: {
55            cflags: ["-DSQLITE_ENABLE_ICU"],
56            shared_libs: [
57                "libicui18n",
58                "libicuuc",
59            ],
60        },
61        vendor: {
62            cflags: ["-USQLITE_ENABLE_ICU"],
63            exclude_shared_libs: ["libandroidicu"],
64        },
65    },
66}
67
68// This static library is variant of libsqlite3_android built without the ICU
69// extension.  The library is supposed to be used in environments where the ICU
70// extension is not needed and the dependency to ICU (which is as large as 60+
71// MB) is not desirable, like microdroid.
72cc_library_static {
73    name: "libsqlite3_android_noicu",
74    defaults: ["libsqlite3_android_defaults"],
75    // Not define SQLITE_ENABLE_ICU
76}
77
78//       The formal test for phone_number_compare() is in DataBaseGeneralTest.java
79//       (as of 2009-08-02), in which phone_number_compare() is tested via sqlite's custom
80//       function "PHONE_NUMBER_COMPARE".
81cc_test {
82    host_supported: true,
83    name: "libsqlite3_phone_number_utils_test",
84    cflags: [
85        "-Wall",
86        "-Werror",
87    ],
88    srcs: [
89        "OldPhoneNumberUtils.cpp",
90        "OldPhoneNumberUtilsTest.cpp",
91        "PhoneNumberUtils.cpp",
92        "PhoneNumberUtilsTest.cpp",
93    ],
94}
95