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

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

Powered by Google App Engine
This is Rietveld 408576698