1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 config("sqlite_config") {
11 "amalgamation/sqlite3.c",
12 "amalgamation/sqlite3.h",
18 "SQLITE_DISABLE_FTS3_UNICODE",
19 "SQLITE_DISABLE_FTS4_DEFERRED",
21 "SQLITE_ENABLE_MEMORY_MANAGEMENT",
22 "SQLITE_SECURE_DELETE",
23 "SQLITE_SEPARATE_CACHE_POOLS",
28 # Despite obvious warnings about not using this flag in deployment, we
29 # are turning off sync in ChromeOS and relying on the underlying
30 # journaling filesystem to do error recovery properly. It's much faster.
36 # Allow xSleep() call on Unix to use usleep() rather than sleep(), so it
37 # will have microsecond precision. Should only affect contended databases
38 # via the busy callback. Browser profile databases are mostly exclusive,
39 # but renderer databases may allow for contention.
43 if (is_linux || is_android) {
45 # Linux provides fdatasync(), a faster equivalent of fsync().
46 "fdatasync=fdatasync",
50 include_dirs = [ "amalgamation" ]
52 configs -= [ "//build/config/compiler:chromium_code" ]
53 configs += [ "//build/config/compiler:no_chromium_code" ]
57 # SQLite doesn"t believe in compiler warnings,
59 # http://www.sqlite.org/faq.html#q17
60 "-Wno-int-to-pointer-cast",
61 "-Wno-pointer-to-int-cast",
64 } else if (is_mac || is_ios) {
65 libs = [ "CoreFoundation.framework" ]
66 } else if (is_android) {
68 "SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT=1048576",
69 "SQLITE_DEFAULT_AUTOVACUUM=1",
70 "SQLITE_TEMP_STORE=3",
71 "SQLITE_ENABLE_FTS3_BACKWARDS",
72 "DSQLITE_DEFAULT_FILE_FORMAT=4",
76 public_configs = [ ":sqlite_config" ]
84 executable("sqlite_shell") {
87 "src/src/shell_icu_linux.c",
89 # Include a dummy c++ file to force linking of libstdc++.
101 source_set("sqlite_regexp") {
103 # Necessary to statically compile the extension.