| 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 = [ |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 "_HAS_EXCEPTIONS=0", | 38 "_HAS_EXCEPTIONS=0", |
| 39 ] | 39 ] |
| 40 if (is_chromeos) { | 40 if (is_chromeos) { |
| 41 defines += [ | 41 defines += [ |
| 42 # Despite obvious warnings about not using this flag in deployment, we | 42 # Despite obvious warnings about not using this flag in deployment, we |
| 43 # are turning off sync in ChromeOS and relying on the underlying | 43 # are turning off sync in ChromeOS and relying on the underlying |
| 44 # journaling filesystem to do error recovery properly. It's much faster. | 44 # journaling filesystem to do error recovery properly. It's much faster. |
| 45 "SQLITE_NO_SYNC", | 45 "SQLITE_NO_SYNC", |
| 46 ] | 46 ] |
| 47 } | 47 } |
| 48 if (is_posix) { |
| 49 defines += [ |
| 50 # Allow xSleep() call on Unix to use usleep() rather than sleep(), so it |
| 51 # will have microsecond precision. Should only affect contended databases |
| 52 # via the busy callback. Browser profile databases are mostly exclusive, |
| 53 # but renderer databases may allow for contention. |
| 54 "HAVE_USLEEP=1", |
| 55 ] |
| 56 } |
| 48 | 57 |
| 49 include_dirs = [ | 58 include_dirs = [ |
| 50 "amalgamation", | 59 "amalgamation", |
| 51 "src/src", # Needed for fts2 to build. | 60 "src/src", # Needed for fts2 to build. |
| 52 ] | 61 ] |
| 53 | 62 |
| 54 configs -= [ "//build/config/compiler:chromium_code" ] | 63 configs -= [ "//build/config/compiler:chromium_code" ] |
| 55 configs += [ "//build/config/compiler:no_chromium_code" ] | 64 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 56 | 65 |
| 57 if (is_win) { | 66 if (is_win) { |
| 58 cflags += [ "/wd4267" ] # Conversion from size_t to "type". | 67 cflags += [ "/wd4267" ] # Conversion from size_t to "type". |
| 59 } else if (is_linux) { | 68 } else if (is_linux) { |
| 60 cflags += [ | 69 cflags += [ |
| 61 # SQLite doesn"t believe in compiler warnings, | 70 # SQLite doesn"t believe in compiler warnings, |
| 62 # preferring testing. | 71 # preferring testing. |
| 63 # http://www.sqlite.org/faq.html#q17 | 72 # http://www.sqlite.org/faq.html#q17 |
| 64 "-Wno-int-to-pointer-cast", | 73 "-Wno-int-to-pointer-cast", |
| 65 "-Wno-pointer-to-int-cast", | 74 "-Wno-pointer-to-int-cast", |
| 66 ] | 75 ] |
| 67 libs = [ "dl" ] | 76 libs = [ "dl" ] |
| 68 } else if (is_mac || is_ios) { | 77 } else if (is_mac || is_ios) { |
| 69 libs = [ "CoreFoundation.framework" ] | 78 libs = [ "CoreFoundation.framework" ] |
| 70 } else if (is_android) { | 79 } else if (is_android) { |
| 71 defines += [ | 80 defines += [ |
| 72 "HAVE_USLEEP=1", | |
| 73 "SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT=1048576", | 81 "SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT=1048576", |
| 74 "SQLITE_DEFAULT_AUTOVACUUM=1", | 82 "SQLITE_DEFAULT_AUTOVACUUM=1", |
| 75 "SQLITE_TEMP_STORE=3", | 83 "SQLITE_TEMP_STORE=3", |
| 76 "SQLITE_ENABLE_FTS3_BACKWARDS", | 84 "SQLITE_ENABLE_FTS3_BACKWARDS", |
| 77 "DSQLITE_DEFAULT_FILE_FORMAT=4", | 85 "DSQLITE_DEFAULT_FILE_FORMAT=4", |
| 78 ] | 86 ] |
| 79 } | 87 } |
| 80 | 88 |
| 81 if (is_clang) { | 89 if (is_clang) { |
| 82 cflags += [ | 90 cflags += [ |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 if (is_ios) { | 127 if (is_ios) { |
| 120 source_set("sqlite_regexp") { | 128 source_set("sqlite_regexp") { |
| 121 sources = [ | 129 sources = [ |
| 122 "src/ext/icu/icu.c", | 130 "src/ext/icu/icu.c", |
| 123 ] | 131 ] |
| 124 deps = [ | 132 deps = [ |
| 125 "//third_party/icu", | 133 "//third_party/icu", |
| 126 ] | 134 ] |
| 127 } | 135 } |
| 128 } | 136 } |
| OLD | NEW |