| OLD | NEW |
| 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 config("sqlite_config") { | 5 config("sqlite_config") { |
| 6 include_dirs = [ "." ] | 6 include_dirs = [ "." ] |
| 7 } | 7 } |
| 8 | 8 |
| 9 source_set("sqlite") { | 9 source_set("sqlite") { |
| 10 sources = [ | 10 sources = [ |
| 11 "amalgamation/sqlite3.c", | 11 "amalgamation/sqlite3.c", |
| 12 "amalgamation/sqlite3.h", | 12 "amalgamation/sqlite3.h", |
| 13 | |
| 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", | |
| 25 ] | 13 ] |
| 26 | 14 |
| 27 cflags = [] | 15 cflags = [] |
| 28 defines = [ | 16 defines = [ |
| 29 "SQLITE_CORE", | 17 "SQLITE_CORE", |
| 30 "SQLITE_ENABLE_BROKEN_FTS2", | |
| 31 "SQLITE_ENABLE_FTS2", | |
| 32 "SQLITE_ENABLE_FTS3", | 18 "SQLITE_ENABLE_FTS3", |
| 33 "SQLITE_DISABLE_FTS3_UNICODE", | 19 "SQLITE_DISABLE_FTS3_UNICODE", |
| 34 "SQLITE_DISABLE_FTS4_DEFERRED", | 20 "SQLITE_DISABLE_FTS4_DEFERRED", |
| 35 "SQLITE_ENABLE_ICU", | 21 "SQLITE_ENABLE_ICU", |
| 36 "SQLITE_ENABLE_MEMORY_MANAGEMENT", | 22 "SQLITE_ENABLE_MEMORY_MANAGEMENT", |
| 37 "SQLITE_SECURE_DELETE", | 23 "SQLITE_SECURE_DELETE", |
| 38 "SQLITE_SEPARATE_CACHE_POOLS", | 24 "SQLITE_SEPARATE_CACHE_POOLS", |
| 39 "THREADSAFE", | 25 "THREADSAFE", |
| 40 "_HAS_EXCEPTIONS=0", | 26 "_HAS_EXCEPTIONS=0", |
| 41 ] | 27 ] |
| 42 if (is_chromeos) { | 28 if (is_chromeos) { |
| 43 defines += [ | 29 defines += [ |
| 44 # Despite obvious warnings about not using this flag in deployment, we | 30 # Despite obvious warnings about not using this flag in deployment, we |
| 45 # are turning off sync in ChromeOS and relying on the underlying | 31 # are turning off sync in ChromeOS and relying on the underlying |
| 46 # journaling filesystem to do error recovery properly. It's much faster. | 32 # journaling filesystem to do error recovery properly. It's much faster. |
| 47 "SQLITE_NO_SYNC", | 33 "SQLITE_NO_SYNC", |
| 48 ] | 34 ] |
| 49 } | 35 } |
| 50 if (is_posix) { | 36 if (is_posix) { |
| 51 defines += [ | 37 defines += [ |
| 52 # Allow xSleep() call on Unix to use usleep() rather than sleep(), so it | 38 # Allow xSleep() call on Unix to use usleep() rather than sleep(), so it |
| 53 # will have microsecond precision. Should only affect contended databases | 39 # will have microsecond precision. Should only affect contended databases |
| 54 # via the busy callback. Browser profile databases are mostly exclusive, | 40 # via the busy callback. Browser profile databases are mostly exclusive, |
| 55 # but renderer databases may allow for contention. | 41 # but renderer databases may allow for contention. |
| 56 "HAVE_USLEEP=1", | 42 "HAVE_USLEEP=1", |
| 57 ] | 43 ] |
| 58 } | 44 } |
| 59 | 45 |
| 60 include_dirs = [ | 46 include_dirs = [ "amalgamation" ] |
| 61 "amalgamation", | |
| 62 "src/src", # Needed for fts2 to build. | |
| 63 ] | |
| 64 | 47 |
| 65 configs -= [ "//build/config/compiler:chromium_code" ] | 48 configs -= [ "//build/config/compiler:chromium_code" ] |
| 66 configs += [ "//build/config/compiler:no_chromium_code" ] | 49 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 67 | 50 |
| 68 if (is_linux) { | 51 if (is_linux) { |
| 69 cflags += [ | 52 cflags += [ |
| 70 # SQLite doesn"t believe in compiler warnings, | 53 # SQLite doesn"t believe in compiler warnings, |
| 71 # preferring testing. | 54 # preferring testing. |
| 72 # http://www.sqlite.org/faq.html#q17 | 55 # http://www.sqlite.org/faq.html#q17 |
| 73 "-Wno-int-to-pointer-cast", | 56 "-Wno-int-to-pointer-cast", |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 if (is_ios) { | 96 if (is_ios) { |
| 114 source_set("sqlite_regexp") { | 97 source_set("sqlite_regexp") { |
| 115 sources = [ | 98 sources = [ |
| 116 "src/ext/icu/icu.c", | 99 "src/ext/icu/icu.c", |
| 117 ] | 100 ] |
| 118 deps = [ | 101 deps = [ |
| 119 "//third_party/icu", | 102 "//third_party/icu", |
| 120 ] | 103 ] |
| 121 } | 104 } |
| 122 } | 105 } |
| OLD | NEW |