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 ] | |
229 if (is_ios) { | 226 if (is_ios) { |
230 deps = [ | 227 deps = [ |
231 ":sqlite_regexp", | 228 ":sqlite_regexp", |
232 ] | 229 ] |
233 } | 230 } |
234 } | 231 } |
235 | 232 |
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 | |
245 if (is_ios) { | 233 if (is_ios) { |
246 source_set("sqlite_regexp") { | 234 source_set("sqlite_regexp") { |
247 defines = [ | 235 defines = [ |
248 # Necessary to statically compile the extension. | 236 # Necessary to statically compile the extension. |
249 "SQLITE_CORE", | 237 "SQLITE_CORE", |
250 "SQLITE_ENABLE_ICU", | 238 "SQLITE_ENABLE_ICU", |
251 "SQLITE_ENABLE_MEMORY_MANAGEMENT", | 239 "SQLITE_ENABLE_MEMORY_MANAGEMENT", |
252 ] | 240 ] |
253 sources = [ | 241 sources = [ |
254 "src/ext/icu/icu.c", | 242 "src/ext/icu/icu.c", |
255 ] | 243 ] |
256 deps = [ | 244 deps = [ |
257 "//third_party/icu", | 245 "//third_party/icu", |
258 ] | 246 ] |
259 if (is_clang) { | 247 if (is_clang) { |
260 # src/ext/icu/icu.c uses assert(!"string") which causes warnings about | 248 # src/ext/icu/icu.c uses assert(!"string") which causes warnings about |
261 # conversion from string literal to bool. | 249 # conversion from string literal to bool. |
262 configs -= [ "//build/config/clang:extra_warnings" ] | 250 configs -= [ "//build/config/clang:extra_warnings" ] |
263 } | 251 } |
264 } | 252 } |
265 } | 253 } |
266 } | 254 } |
OLD | NEW |