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.h",
12 "amalgamation/sqlite3.c",
14 # fts2.c currently has a lot of conflicts when added to
15 # the amalgamation. It is probably not worth fixing that.
16 "src/ext/fts2/fts2.c",
17 "src/ext/fts2/fts2.h",
18 "src/ext/fts2/fts2_hash.c",
19 "src/ext/fts2/fts2_hash.h",
20 "src/ext/fts2/fts2_icu.c",
21 "src/ext/fts2/fts2_porter.c",
22 "src/ext/fts2/fts2_tokenizer.c",
23 "src/ext/fts2/fts2_tokenizer.h",
24 "src/ext/fts2/fts2_tokenizer1.c",
30 "SQLITE_ENABLE_BROKEN_FTS2",
33 "SQLITE_DISABLE_FTS3_UNICODE",
34 "SQLITE_DISABLE_FTS4_DEFERRED",
36 "SQLITE_ENABLE_MEMORY_MANAGEMENT",
37 "SQLITE_SECURE_DELETE",
38 "SQLITE_SEPARATE_CACHE_POOLS",
44 # Despite obvious warnings about not using this flag in deployment, we
45 # are turning off sync in ChromeOS and relying on the underlying
46 # journaling filesystem to do error recovery properly. It's much faster.
52 # Allow xSleep() call on Unix to use usleep() rather than sleep(), so it
53 # will have microsecond precision. Should only affect contended databases
54 # via the busy callback. Browser profile databases are mostly exclusive,
55 # but renderer databases may allow for contention.
62 "src/src", # Needed for fts2 to build.
65 configs -= [ "//build/config/compiler:chromium_code" ]
66 configs += [ "//build/config/compiler:no_chromium_code" ]
70 # SQLite doesn"t believe in compiler warnings,
72 # http://www.sqlite.org/faq.html#q17
73 "-Wno-int-to-pointer-cast",
74 "-Wno-pointer-to-int-cast",
77 } else if (is_mac || is_ios) {
78 libs = [ "CoreFoundation.framework" ]
79 } else if (is_android) {
81 "SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT=1048576",
82 "SQLITE_DEFAULT_AUTOVACUUM=1",
83 "SQLITE_TEMP_STORE=3",
84 "SQLITE_ENABLE_FTS3_BACKWARDS",
85 "DSQLITE_DEFAULT_FILE_FORMAT=4",
89 public_configs = [ ":sqlite_config" ]
97 executable("sqlite_shell") {
100 "src/src/shell_icu_linux.c",
102 # Include a dummy c++ file to force linking of libstdc++.
114 source_set("sqlite_regexp") {