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

Side by Side Diff: runtime/bin/net/sqlite.gyp

Issue 10909189: Add gyp files to build NSS in Dart (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove changes at global level, move to runtime configuration file. Created 8 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
Mads Ager (google) 2012/10/31 09:01:01 Same comment here. Let's make it clear where this
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 {
6 'includes': [
7 '../../tools/gyp/runtime-configurations.gypi',
8 '../../tools/gyp/third_party_configurations.gypi',
9 ],
10 'variables': {
11 'sqlite_directory': '../../../third_party/sqlite',
12 'use_system_sqlite%': 0,
13 'required_sqlite_version': '3.6.1',
14 },
15 'target_defaults': {
16 'defines': [
17 'SQLITE_CORE',
18 'SQLITE_ENABLE_BROKEN_FTS2',
19 'SQLITE_ENABLE_FTS2',
20 'SQLITE_ENABLE_FTS3',
21 # 'SQLITE_ENABLE_ICU',
22 'SQLITE_ENABLE_MEMORY_MANAGEMENT',
23 'SQLITE_SECURE_DELETE',
24 'THREADSAFE',
25 '_HAS_EXCEPTIONS=0',
26 ],
27 },
28 'targets': [
29 {
30 'target_name': 'sqlite',
31 'conditions': [
32 [ 'chromeos==1' , {
33 'defines': [
34 # Despite obvious warnings about not using this flag
35 # in deployment, we are turning off sync in ChromeOS
36 # and relying on the underlying journaling filesystem
37 # to do error recovery properly. It's much faster.
38 'SQLITE_NO_SYNC',
39 ],
40 },
41 ],
42 ['use_system_sqlite', {
43 'type': 'none',
44 'direct_dependent_settings': {
45 'defines': [
46 'USE_SYSTEM_SQLITE',
47 ],
48 },
49
50 'conditions': [
51 ['OS == "ios"', {
52 'link_settings': {
53 'libraries': [
54 '$(SDKROOT)/usr/lib/libsqlite3.dylib',
55 ],
56 },
57 }],
58 ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"' , {
59 'direct_dependent_settings': {
60 'cflags': [
61 # 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
63 # version of sqlite.
64 '<!@(pkg-config --atleast-version=<(required_sqlite_version) s qlite3)',
65
66 '<!@(pkg-config --cflags sqlite3)',
67 ],
68 },
69 'link_settings': {
70 'ldflags': [
71 '<!@(pkg-config --libs-only-L --libs-only-other sqlite3)',
72 ],
73 'libraries': [
74 '<!@(pkg-config --libs-only-l sqlite3)',
75 ],
76 },
77 }],
78 ],
79 }, { # !use_system_sqlite
80 'product_name': 'sqlite3',
81 'type': 'static_library',
82 'sources': [
83 '<(sqlite_directory)/amalgamation/sqlite3.h',
84 '<(sqlite_directory)/amalgamation/sqlite3.c',
85 # fts2.c currently has a lot of conflicts when added to
86 # the amalgamation. It is probably not worth fixing that.
87 '<(sqlite_directory)/src/ext/fts2/fts2.c',
88 '<(sqlite_directory)/src/ext/fts2/fts2.h',
89 '<(sqlite_directory)/src/ext/fts2/fts2_hash.c',
90 '<(sqlite_directory)/src/ext/fts2/fts2_hash.h',
91 '<(sqlite_directory)/src/ext/fts2/fts2_icu.c',
92 '<(sqlite_directory)/src/ext/fts2/fts2_porter.c',
93 '<(sqlite_directory)/src/ext/fts2/fts2_tokenizer.c',
94 '<(sqlite_directory)/src/ext/fts2/fts2_tokenizer.h',
95 '<(sqlite_directory)/src/ext/fts2/fts2_tokenizer1.c',
96 ],
97
98 # TODO(shess): Previously fts1 and rtree files were
99 # explicitly excluded from the build. Make sure they are
100 # logically still excluded.
101
102 # TODO(shess): Should all of the sources be listed and then
103 # excluded? For editing purposes?
104
105 'include_dirs': [
106 '<(sqlite_directory)/amalgamation',
107 # Needed for fts2 to build.
108 '<(sqlite_directory)/src/src',
109 ],
110 'dependencies': [
111 # '../icu/icu.gyp:icui18n',
112 # '../icu/icu.gyp:icuuc',
113 ],
114 'direct_dependent_settings': {
115 'include_dirs': [
116 '<(sqlite_directory)/.',
117 '<(sqlite_directory)/../..',
118 ],
119 },
120 'msvs_disabled_warnings': [
121 4018, 4244,
122 ],
123 'conditions': [
124 ['OS=="linux"', {
125 'link_settings': {
126 'libraries': [
127 '-ldl',
128 ],
129 },
130 }],
131 ['OS == "android"', {
132 'defines': [
133 'HAVE_USLEEP=1',
134 'SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT=1048576',
135 'SQLITE_DEFAULT_AUTOVACUUM=1',
136 'SQLITE_TEMP_STORE=3',
137 'SQLITE_ENABLE_FTS3_BACKWARDS',
138 'DSQLITE_DEFAULT_FILE_FORMAT=4',
139 ],
140 }],
141 ['os_posix == 1 and OS != "mac" and OS != "android"', {
142 'cflags': [
143 # SQLite doesn't believe in compiler warnings,
144 # preferring testing.
145 # http://www.sqlite.org/faq.html#q17
146 '-Wno-int-to-pointer-cast',
147 '-Wno-pointer-to-int-cast',
148 ],
149 }],
150 ['clang==1', {
151 'xcode_settings': {
152 'WARNING_CFLAGS': [
153 # sqlite does `if (*a++ && *b++);` in a non-buggy way.
154 '-Wno-empty-body',
155 # sqlite has some `unsigned < 0` checks.
156 '-Wno-tautological-compare',
157 ],
158 },
159 'cflags': [
160 '-Wno-empty-body',
161 '-Wno-tautological-compare',
162 ],
163 }],
164 ],
165 }],
166 ],
167 },
168 ],
169 'conditions': [
170 ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android" and not use_system_sqlite', {
171 'targets': [
172 {
173 'target_name': 'sqlite_shell',
174 'type': 'executable',
175 'dependencies': [
176 # '../icu/icu.gyp:icuuc',
177 'sqlite',
178 ],
179 'sources': [
180 '<(sqlite_directory)/src/src/shell.c',
181 '<(sqlite_directory)/src/src/shell_icu_linux.c',
182 ],
183 'link_settings': {
184 'link_languages': ['c++'],
185 },
186 },
187 ],
188 },]
189 ],
190 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698