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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/snappy/snappy.gyp ('k') | third_party/sqlite/sqlite.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/BUILD.gn
diff --git a/third_party/sqlite/BUILD.gn b/third_party/sqlite/BUILD.gn
index 95b9cb978b2c3bc08fddbe7bd5e8298423e8a568..866c2449101283f3c98644074a7f009372f102b1 100644
--- a/third_party/sqlite/BUILD.gn
+++ b/third_party/sqlite/BUILD.gn
@@ -57,17 +57,31 @@ if (!use_system_sqlite) {
include_dirs = [ "amalgamation" ]
+ config("sqlite_warnings") {
+ cflags = []
+ if (is_clang) {
+ # sqlite contains a few functions that are unused, at least on
+ # Windows with Chromium's sqlite patches applied
+ # (interiorCursorEOF fts3EvalDeferredPhrase
+ # fts3EvalSelectDeferred sqlite3Fts3InitHashTable
+ # sqlite3Fts3InitTok).
+ cflags += [ "-Wno-unused-function" ]
+ }
+ if (is_linux) {
+ cflags += [
+ # SQLite doesn"t believe in compiler warnings,
+ # preferring testing.
+ # http://www.sqlite.org/faq.html#q17
+ "-Wno-int-to-pointer-cast",
+ "-Wno-pointer-to-int-cast",
+ ]
+ }
+ }
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
+ configs += [ ":sqlite_warnings" ]
if (is_linux) {
- cflags += [
- # SQLite doesn"t believe in compiler warnings,
- # preferring testing.
- # http://www.sqlite.org/faq.html#q17
- "-Wno-int-to-pointer-cast",
- "-Wno-pointer-to-int-cast",
- ]
libs = [ "dl" ]
} else if (is_mac || is_ios) {
libs = [ "CoreFoundation.framework" ]
« 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