OLD | NEW |
---|---|
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 { | 5 { |
6 'variables': { | 6 'variables': { |
7 'use_system_sqlite%': 0, | 7 'use_system_sqlite%': 0, |
8 'required_sqlite_version': '3.6.1', | 8 'required_sqlite_version': '3.6.1', |
9 }, | 9 }, |
10 'target_defaults': { | 10 'target_defaults': { |
(...skipping 16 matching lines...) Expand all Loading... | |
27 [ 'chromeos==1' , { | 27 [ 'chromeos==1' , { |
28 'defines': [ | 28 'defines': [ |
29 # Despite obvious warnings about not using this flag | 29 # Despite obvious warnings about not using this flag |
30 # in deployment, we are turning off sync in ChromeOS | 30 # in deployment, we are turning off sync in ChromeOS |
31 # and relying on the underlying journaling filesystem | 31 # and relying on the underlying journaling filesystem |
32 # to do error recovery properly. It's much faster. | 32 # to do error recovery properly. It's much faster. |
33 'SQLITE_NO_SYNC', | 33 'SQLITE_NO_SYNC', |
34 ], | 34 ], |
35 }, | 35 }, |
36 ], | 36 ], |
37 ['OS == "android"', { | |
38 'defines': [ | |
39 'SQLITE_TEMP_STORE=3', | |
40 ], | |
41 }], | |
42 ['use_system_sqlite', { | 37 ['use_system_sqlite', { |
43 'type': 'none', | 38 'type': 'none', |
44 'direct_dependent_settings': { | 39 'direct_dependent_settings': { |
45 'defines': [ | 40 'defines': [ |
46 'USE_SYSTEM_SQLITE', | 41 'USE_SYSTEM_SQLITE', |
47 ], | 42 ], |
48 }, | 43 }, |
49 | 44 |
50 'conditions': [ | 45 'conditions': [ |
51 ['OS == "ios"', { | 46 ['OS == "ios"', { |
52 'link_settings': { | 47 'link_settings': { |
53 'libraries': [ | 48 'libraries': [ |
54 '$(SDKROOT)/usr/lib/libsqlite3.dylib', | 49 '$(SDKROOT)/usr/lib/libsqlite3.dylib', |
55 ], | 50 ], |
56 }, | 51 }, |
57 }], | 52 }], |
58 ['os_posix == 1 and OS != "mac" and OS != "ios"', { | 53 ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"' , { |
59 'direct_dependent_settings': { | 54 'direct_dependent_settings': { |
60 'cflags': [ | 55 'cflags': [ |
61 # This next command produces no output but it it will fail | 56 # This next command produces no output but it it will fail |
62 # (and cause GYP to fail) if we don't have a recent enough | 57 # (and cause GYP to fail) if we don't have a recent enough |
63 # version of sqlite. | 58 # version of sqlite. |
64 '<!@(pkg-config --atleast-version=<(required_sqlite_version) s qlite3)', | 59 '<!@(pkg-config --atleast-version=<(required_sqlite_version) s qlite3)', |
65 | 60 |
66 '<!@(pkg-config --cflags sqlite3)', | 61 '<!@(pkg-config --cflags sqlite3)', |
67 ], | 62 ], |
68 }, | 63 }, |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
121 4018, 4244, | 116 4018, 4244, |
122 ], | 117 ], |
123 'conditions': [ | 118 'conditions': [ |
124 ['OS=="linux"', { | 119 ['OS=="linux"', { |
125 'link_settings': { | 120 'link_settings': { |
126 'libraries': [ | 121 'libraries': [ |
127 '-ldl', | 122 '-ldl', |
128 ], | 123 ], |
129 }, | 124 }, |
130 }], | 125 }], |
131 ['os_posix == 1 and OS != "mac"', { | 126 ['OS == "android"', { |
127 'defines': [ | |
128 'HAVE_USLEEP=1', | |
129 'SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT=1048576', | |
130 'SQLITE_DEFAULT_AUTOVACUUM=1', | |
131 'SQLITE_TEMP_STORE=3', | |
132 'SQLITE_ENABLE_FTS3_BACKWARDS', | |
133 'DSQLITE_DEFAULT_FILE_FORMAT=4', | |
andreip3000
2012/08/01 11:46:06
Should we match the flags that Android uses?
http
Yaron
2012/08/04 01:14:43
I took the set that we had previously and just rem
| |
134 ], | |
135 }], | |
136 ['os_posix == 1 and OS != "mac" and OS != "android"', { | |
132 'cflags': [ | 137 'cflags': [ |
133 # SQLite doesn't believe in compiler warnings, | 138 # SQLite doesn't believe in compiler warnings, |
134 # preferring testing. | 139 # preferring testing. |
135 # http://www.sqlite.org/faq.html#q17 | 140 # http://www.sqlite.org/faq.html#q17 |
136 '-Wno-int-to-pointer-cast', | 141 '-Wno-int-to-pointer-cast', |
137 '-Wno-pointer-to-int-cast', | 142 '-Wno-pointer-to-int-cast', |
138 ], | 143 ], |
139 }], | 144 }], |
140 ['clang==1', { | 145 ['clang==1', { |
141 'xcode_settings': { | 146 'xcode_settings': { |
142 'WARNING_CFLAGS': [ | 147 'WARNING_CFLAGS': [ |
143 # sqlite does `if (*a++ && *b++);` in a non-buggy way. | 148 # sqlite does `if (*a++ && *b++);` in a non-buggy way. |
144 '-Wno-empty-body', | 149 '-Wno-empty-body', |
145 # sqlite has some `unsigned < 0` checks. | 150 # sqlite has some `unsigned < 0` checks. |
146 '-Wno-tautological-compare', | 151 '-Wno-tautological-compare', |
147 ], | 152 ], |
148 }, | 153 }, |
149 'cflags': [ | 154 'cflags': [ |
150 '-Wno-empty-body', | 155 '-Wno-empty-body', |
151 '-Wno-tautological-compare', | 156 '-Wno-tautological-compare', |
152 ], | 157 ], |
153 }], | 158 }], |
154 ], | 159 ], |
155 }], | 160 }], |
156 ], | 161 ], |
157 }, | 162 }, |
158 ], | 163 ], |
159 'conditions': [ | 164 'conditions': [ |
160 ['os_posix == 1 and OS != "mac" and OS != "ios" and not use_system_sqlite', { | 165 ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android" and not use_system_sqlite', { |
161 'targets': [ | 166 'targets': [ |
162 { | 167 { |
163 'target_name': 'sqlite_shell', | 168 'target_name': 'sqlite_shell', |
164 'type': 'executable', | 169 'type': 'executable', |
165 'dependencies': [ | 170 'dependencies': [ |
166 '../icu/icu.gyp:icuuc', | 171 '../icu/icu.gyp:icuuc', |
167 'sqlite', | 172 'sqlite', |
168 ], | 173 ], |
169 'sources': [ | 174 'sources': [ |
170 'src/src/shell.c', | 175 'src/src/shell.c', |
171 'src/src/shell_icu_linux.c', | 176 'src/src/shell_icu_linux.c', |
172 ], | 177 ], |
173 'link_settings': { | 178 'link_settings': { |
174 'link_languages': ['c++'], | 179 'link_languages': ['c++'], |
175 }, | 180 }, |
176 }, | 181 }, |
177 ], | 182 ], |
178 },] | 183 },] |
179 ], | 184 ], |
180 } | 185 } |
OLD | NEW |