Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Side by Side Diff: third_party/sqlite/BUILD.gn

Issue 1437823005: [sql] uClibc doesn't provide malloc_usable_size(). (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 18 matching lines...) Expand all
29 "-Wno-pointer-to-int-cast", 29 "-Wno-pointer-to-int-cast",
30 ] 30 ]
31 } 31 }
32 } 32 }
33 33
34 # "sqlite3" can cause conflicts with the system library. 34 # "sqlite3" can cause conflicts with the system library.
35 component("chromium_sqlite3") { 35 component("chromium_sqlite3") {
36 visibility = [ ":*" ] 36 visibility = [ ":*" ]
37 37
38 sources = [ 38 sources = [
39 "amalgamation/config.h",
39 "amalgamation/sqlite3.c", 40 "amalgamation/sqlite3.c",
40 "amalgamation/sqlite3.h", 41 "amalgamation/sqlite3.h",
41 ] 42 ]
42 43
43 cflags = [] 44 cflags = []
44 defines = [ 45 defines = [
45 "SQLITE_ENABLE_FTS3", 46 "SQLITE_ENABLE_FTS3",
46 47
47 # New unicode61 tokenizer with built-in tables. 48 # New unicode61 tokenizer with built-in tables.
48 "SQLITE_DISABLE_FTS3_UNICODE", 49 "SQLITE_DISABLE_FTS3_UNICODE",
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 "USE_PREAD=1", 116 "USE_PREAD=1",
116 ] 117 ]
117 } 118 }
118 if (is_linux || is_android) { 119 if (is_linux || is_android) {
119 defines += [ 120 defines += [
120 # Linux provides fdatasync(), a faster equivalent of fsync(). 121 # Linux provides fdatasync(), a faster equivalent of fsync().
121 "fdatasync=fdatasync", 122 "fdatasync=fdatasync",
122 ] 123 ]
123 } 124 }
124 125
125 # SQLite wants to track malloc sizes. On OSX it uses malloc_size(), on 126 # Pull in config.h on Linux. This allows use of preprocessor macros which
126 # Windows _msize(), elsewhere it handles it manually by enlarging the malloc 127 # are not available to the build config.
127 # and injecting a field. Enable malloc_usable_size() for Linux.
128 # NOTE(shess): Android does _not_ export malloc_usable_size().
129 if (is_linux) { 128 if (is_linux) {
130 defines += [ 129 defines += [ "_HAVE_SQLITE_CONFIG_H" ]
131 "HAVE_MALLOC_H",
132 "HAVE_MALLOC_USABLE_SIZE",
133 ]
134 } 130 }
135 131
136 include_dirs = [ "amalgamation" ] 132 include_dirs = [ "amalgamation" ]
137 133
138 configs -= [ "//build/config/compiler:chromium_code" ] 134 configs -= [ "//build/config/compiler:chromium_code" ]
139 configs += [ 135 configs += [
140 "//build/config/compiler:no_chromium_code", 136 "//build/config/compiler:no_chromium_code",
141 137
142 # Must be after no_chromium_code for warning flags to be ordered 138 # Must be after no_chromium_code for warning flags to be ordered
143 # correctly. 139 # correctly.
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 "//third_party/icu", 237 "//third_party/icu",
242 ] 238 ]
243 if (is_clang) { 239 if (is_clang) {
244 # src/ext/icu/icu.c uses assert(!"string") which causes warnings about 240 # src/ext/icu/icu.c uses assert(!"string") which causes warnings about
245 # conversion from string literal to bool. 241 # conversion from string literal to bool.
246 configs -= [ "//build/config/clang:extra_warnings" ] 242 configs -= [ "//build/config/clang:extra_warnings" ]
247 } 243 }
248 } 244 }
249 } 245 }
250 } 246 }
OLDNEW
« no previous file with comments | « no previous file | third_party/sqlite/amalgamation/config.h » ('j') | third_party/sqlite/amalgamation/config.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698