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 declare_args() { | 5 declare_args() { |
6 # Controls whether the build should uses the version of sqlite3 library | 6 # Controls whether the build should uses the version of sqlite3 library |
7 # shipped with the system (currently only supported on iOS) or the one | 7 # shipped with the system (currently only supported on iOS) or the one |
8 # shipped with Chromium source. | 8 # shipped with Chromium source. |
9 use_system_sqlite = is_ios | 9 use_system_sqlite = is_ios |
10 } | 10 } |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 defines = [ "USE_SYSTEM_SQLITE" ] | 216 defines = [ "USE_SYSTEM_SQLITE" ] |
217 if (is_ios) { | 217 if (is_ios) { |
218 libs = [ "sqlite3" ] | 218 libs = [ "sqlite3" ] |
219 } else { | 219 } else { |
220 assert(false, "extra flags to use system sqlite3 library missing") | 220 assert(false, "extra flags to use system sqlite3 library missing") |
221 } | 221 } |
222 } | 222 } |
223 | 223 |
224 source_set("sqlite") { | 224 source_set("sqlite") { |
225 public_configs = [ ":sqlite_config" ] | 225 public_configs = [ ":sqlite_config" ] |
| 226 deps = [ |
| 227 ":sqlite_recover", |
| 228 ] |
226 if (is_ios) { | 229 if (is_ios) { |
227 deps = [ | 230 deps = [ |
228 ":sqlite_regexp", | 231 ":sqlite_regexp", |
229 ] | 232 ] |
230 } | 233 } |
231 } | 234 } |
232 | 235 |
| 236 source_set("sqlite_recover") { |
| 237 sources = [ |
| 238 # TODO(shess): Move out of the SQLite source tree, perhaps to ext/. |
| 239 "src/src/recover.c", |
| 240 "src/src/recover.h", |
| 241 "src/src/recover_varint.c", |
| 242 ] |
| 243 } |
| 244 |
233 if (is_ios) { | 245 if (is_ios) { |
234 source_set("sqlite_regexp") { | 246 source_set("sqlite_regexp") { |
235 defines = [ | 247 defines = [ |
236 # Necessary to statically compile the extension. | 248 # Necessary to statically compile the extension. |
237 "SQLITE_CORE", | 249 "SQLITE_CORE", |
238 "SQLITE_ENABLE_ICU", | 250 "SQLITE_ENABLE_ICU", |
239 "SQLITE_ENABLE_MEMORY_MANAGEMENT", | 251 "SQLITE_ENABLE_MEMORY_MANAGEMENT", |
240 ] | 252 ] |
241 sources = [ | 253 sources = [ |
242 "src/ext/icu/icu.c", | 254 "src/ext/icu/icu.c", |
243 ] | 255 ] |
244 deps = [ | 256 deps = [ |
245 "//third_party/icu", | 257 "//third_party/icu", |
246 ] | 258 ] |
247 if (is_clang) { | 259 if (is_clang) { |
248 # src/ext/icu/icu.c uses assert(!"string") which causes warnings about | 260 # src/ext/icu/icu.c uses assert(!"string") which causes warnings about |
249 # conversion from string literal to bool. | 261 # conversion from string literal to bool. |
250 configs -= [ "//build/config/clang:extra_warnings" ] | 262 configs -= [ "//build/config/clang:extra_warnings" ] |
251 } | 263 } |
252 } | 264 } |
253 } | 265 } |
254 } | 266 } |
OLD | NEW |