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

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

Issue 1269293003: Explicitly pass -Wno-unused-function to the targets that need it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gnnnnnnnnnnn Created 5 years, 4 months 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
« no previous file with comments | « third_party/snappy/snappy.gyp ('k') | third_party/sqlite/sqlite.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 } 50 }
51 if (is_linux || is_android) { 51 if (is_linux || is_android) {
52 defines += [ 52 defines += [
53 # Linux provides fdatasync(), a faster equivalent of fsync(). 53 # Linux provides fdatasync(), a faster equivalent of fsync().
54 "fdatasync=fdatasync", 54 "fdatasync=fdatasync",
55 ] 55 ]
56 } 56 }
57 57
58 include_dirs = [ "amalgamation" ] 58 include_dirs = [ "amalgamation" ]
59 59
60 config("sqlite_warnings") {
61 cflags = []
62 if (is_clang) {
63 # sqlite contains a few functions that are unused, at least on
64 # Windows with Chromium's sqlite patches applied
65 # (interiorCursorEOF fts3EvalDeferredPhrase
66 # fts3EvalSelectDeferred sqlite3Fts3InitHashTable
67 # sqlite3Fts3InitTok).
68 cflags += [ "-Wno-unused-function" ]
69 }
70 if (is_linux) {
71 cflags += [
72 # SQLite doesn"t believe in compiler warnings,
73 # preferring testing.
74 # http://www.sqlite.org/faq.html#q17
75 "-Wno-int-to-pointer-cast",
76 "-Wno-pointer-to-int-cast",
77 ]
78 }
79 }
60 configs -= [ "//build/config/compiler:chromium_code" ] 80 configs -= [ "//build/config/compiler:chromium_code" ]
61 configs += [ "//build/config/compiler:no_chromium_code" ] 81 configs += [ "//build/config/compiler:no_chromium_code" ]
82 configs += [ ":sqlite_warnings" ]
62 83
63 if (is_linux) { 84 if (is_linux) {
64 cflags += [
65 # SQLite doesn"t believe in compiler warnings,
66 # preferring testing.
67 # http://www.sqlite.org/faq.html#q17
68 "-Wno-int-to-pointer-cast",
69 "-Wno-pointer-to-int-cast",
70 ]
71 libs = [ "dl" ] 85 libs = [ "dl" ]
72 } else if (is_mac || is_ios) { 86 } else if (is_mac || is_ios) {
73 libs = [ "CoreFoundation.framework" ] 87 libs = [ "CoreFoundation.framework" ]
74 } else if (is_android) { 88 } else if (is_android) {
75 defines += [ 89 defines += [
76 "SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT=1048576", 90 "SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT=1048576",
77 "SQLITE_DEFAULT_AUTOVACUUM=1", 91 "SQLITE_DEFAULT_AUTOVACUUM=1",
78 "SQLITE_TEMP_STORE=3", 92 "SQLITE_TEMP_STORE=3",
79 "SQLITE_ENABLE_FTS3_BACKWARDS", 93 "SQLITE_ENABLE_FTS3_BACKWARDS",
80 "DSQLITE_DEFAULT_FILE_FORMAT=4", 94 "DSQLITE_DEFAULT_FILE_FORMAT=4",
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 "//third_party/icu", 164 "//third_party/icu",
151 ] 165 ]
152 if (is_clang) { 166 if (is_clang) {
153 # src/ext/icu/icu.c uses assert(!"string") which causes warnings about 167 # src/ext/icu/icu.c uses assert(!"string") which causes warnings about
154 # conversion from string literal to bool. 168 # conversion from string literal to bool.
155 configs -= [ "//build/config/clang:extra_warnings" ] 169 configs -= [ "//build/config/clang:extra_warnings" ]
156 } 170 }
157 } 171 }
158 } 172 }
159 } 173 }
OLDNEW
« no previous file with comments | « third_party/snappy/snappy.gyp ('k') | third_party/sqlite/sqlite.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698