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

Side by Side Diff: tools/gyp/v8.gyp

Issue 293993021: Support external startup data in V8. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Final rebase (I hope) w/ various fixes. Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « tools/concatenate-files.py ('k') | tools/js2c.py » ('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 2012 the V8 project authors. All rights reserved. 1 # Copyright 2012 the V8 project authors. All rights reserved.
2 # Redistribution and use in source and binary forms, with or without 2 # Redistribution and use in source and binary forms, with or without
3 # modification, are permitted provided that the following conditions are 3 # modification, are permitted provided that the following conditions are
4 # met: 4 # met:
5 # 5 #
6 # * Redistributions of source code must retain the above copyright 6 # * Redistributions of source code must retain the above copyright
7 # notice, this list of conditions and the following disclaimer. 7 # notice, this list of conditions and the following disclaimer.
8 # * Redistributions in binary form must reproduce the above 8 # * Redistributions in binary form must reproduce the above
9 # copyright notice, this list of conditions and the following 9 # copyright notice, this list of conditions and the following
10 # disclaimer in the documentation and/or other materials provided 10 # disclaimer in the documentation and/or other materials provided
(...skipping 24 matching lines...) Expand all
35 'targets': [ 35 'targets': [
36 { 36 {
37 'target_name': 'v8', 37 'target_name': 'v8',
38 'dependencies_traverse': 1, 38 'dependencies_traverse': 1,
39 'conditions': [ 39 'conditions': [
40 ['want_separate_host_toolset==1', { 40 ['want_separate_host_toolset==1', {
41 'toolsets': ['host', 'target'], 41 'toolsets': ['host', 'target'],
42 }, { 42 }, {
43 'toolsets': ['target'], 43 'toolsets': ['target'],
44 }], 44 }],
45 ['v8_use_snapshot=="true"', { 45
46 ['v8_use_snapshot=="true" and v8_use_external_startup_data==0', {
46 # The dependency on v8_base should come from a transitive 47 # The dependency on v8_base should come from a transitive
47 # dependency however the Android toolchain requires libv8_base.a 48 # dependency however the Android toolchain requires libv8_base.a
48 # to appear before libv8_snapshot.a so it's listed explicitly. 49 # to appear before libv8_snapshot.a so it's listed explicitly.
49 'dependencies': ['v8_base', 'v8_snapshot'], 50 'dependencies': ['v8_base', 'v8_snapshot'],
50 }, 51 }],
51 { 52 ['v8_use_snapshot!="true" and v8_use_external_startup_data==0', {
52 # The dependency on v8_base should come from a transitive 53 # The dependency on v8_base should come from a transitive
53 # dependency however the Android toolchain requires libv8_base.a 54 # dependency however the Android toolchain requires libv8_base.a
54 # to appear before libv8_snapshot.a so it's listed explicitly. 55 # to appear before libv8_snapshot.a so it's listed explicitly.
55 'dependencies': ['v8_base', 'v8_nosnapshot'], 56 'dependencies': ['v8_base', 'v8_nosnapshot'],
56 }], 57 }],
58 ['v8_use_external_startup_data==1', {
59 'dependencies': ['v8_base', 'v8_external_snapshot'],
60 }],
57 ['component=="shared_library"', { 61 ['component=="shared_library"', {
58 'type': '<(component)', 62 'type': '<(component)',
59 'sources': [ 63 'sources': [
60 # Note: on non-Windows we still build this file so that gyp 64 # Note: on non-Windows we still build this file so that gyp
61 # has some sources to link into the component. 65 # has some sources to link into the component.
62 '../../src/v8dll-main.cc', 66 '../../src/v8dll-main.cc',
63 ], 67 ],
64 'include_dirs': [ 68 'include_dirs': [
65 '../..', 69 '../..',
66 ], 70 ],
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 'v8_base', 145 'v8_base',
142 ], 146 ],
143 'include_dirs+': [ 147 'include_dirs+': [
144 '../..', 148 '../..',
145 ], 149 ],
146 'sources': [ 150 'sources': [
147 '<(SHARED_INTERMEDIATE_DIR)/libraries.cc', 151 '<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
148 '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc', 152 '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc',
149 '<(SHARED_INTERMEDIATE_DIR)/trig-table.cc', 153 '<(SHARED_INTERMEDIATE_DIR)/trig-table.cc',
150 '<(INTERMEDIATE_DIR)/snapshot.cc', 154 '<(INTERMEDIATE_DIR)/snapshot.cc',
155 '../../src/snapshot-common.cc',
151 ], 156 ],
152 'actions': [ 157 'actions': [
153 { 158 {
154 'action_name': 'run_mksnapshot', 159 'action_name': 'run_mksnapshot',
155 'inputs': [ 160 'inputs': [
156 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot<(EXECUTABLE_SUFFIX)', 161 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot<(EXECUTABLE_SUFFIX)',
157 ], 162 ],
158 'outputs': [ 163 'outputs': [
159 '<(INTERMEDIATE_DIR)/snapshot.cc', 164 '<(INTERMEDIATE_DIR)/snapshot.cc',
160 ], 165 ],
161 'variables': { 166 'variables': {
162 'mksnapshot_flags': [ 167 'mksnapshot_flags': [
163 '--log-snapshot-positions', 168 '--log-snapshot-positions',
164 '--logfile', '<(INTERMEDIATE_DIR)/snapshot.log', 169 '--logfile', '<(INTERMEDIATE_DIR)/snapshot.log',
165 ], 170 ],
166 'conditions': [ 171 'conditions': [
167 ['v8_random_seed!=0', { 172 ['v8_random_seed!=0', {
168 'mksnapshot_flags': ['--random-seed', '<(v8_random_seed)'], 173 'mksnapshot_flags': ['--random-seed', '<(v8_random_seed)'],
169 }], 174 }],
170 ], 175 ],
171 }, 176 },
172 'action': [ 177 'action': [
173 '<@(_inputs)', 178 '<@(_inputs)',
174 '<@(mksnapshot_flags)', 179 '<@(mksnapshot_flags)',
175 '<@(_outputs)' 180 '<@(INTERMEDIATE_DIR)/snapshot.cc'
176 ], 181 ],
177 }, 182 },
178 ], 183 ],
179 }, 184 },
180 { 185 {
181 'target_name': 'v8_nosnapshot', 186 'target_name': 'v8_nosnapshot',
182 'type': 'static_library', 187 'type': 'static_library',
183 'dependencies': [ 188 'dependencies': [
184 'v8_base', 189 'v8_base',
185 ], 190 ],
186 'include_dirs+': [ 191 'include_dirs+': [
187 '../..', 192 '../..',
188 ], 193 ],
189 'sources': [ 194 'sources': [
190 '<(SHARED_INTERMEDIATE_DIR)/libraries.cc', 195 '<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
191 '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc', 196 '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc',
192 '<(SHARED_INTERMEDIATE_DIR)/trig-table.cc', 197 '<(SHARED_INTERMEDIATE_DIR)/trig-table.cc',
198 '../../src/snapshot-common.cc',
193 '../../src/snapshot-empty.cc', 199 '../../src/snapshot-empty.cc',
194 ], 200 ],
195 'conditions': [ 201 'conditions': [
196 ['want_separate_host_toolset==1', { 202 ['want_separate_host_toolset==1', {
197 'toolsets': ['host', 'target'], 203 'toolsets': ['host', 'target'],
198 'dependencies': ['js2c#host', 'generate_trig_table#host'], 204 'dependencies': ['js2c#host', 'generate_trig_table#host'],
199 }, { 205 }, {
200 'toolsets': ['target'], 206 'toolsets': ['target'],
201 'dependencies': ['js2c', 'generate_trig_table'], 207 'dependencies': ['js2c', 'generate_trig_table'],
202 }], 208 }],
203 ['component=="shared_library"', { 209 ['component=="shared_library"', {
204 'defines': [ 210 'defines': [
205 'BUILDING_V8_SHARED', 211 'BUILDING_V8_SHARED',
206 'V8_SHARED', 212 'V8_SHARED',
207 ], 213 ],
208 }], 214 }],
209 ] 215 ]
210 }, 216 },
217 {
218 'target_name': 'v8_external_snapshot',
219 'type': 'static_library',
220 'conditions': [
221 ['want_separate_host_toolset==1', {
222 'toolsets': ['host', 'target'],
223 'dependencies': [
224 'mksnapshot#host',
225 'js2c#host',
226 'generate_trig_table#host',
227 'natives_blob#host',
228 ]}, {
229 'toolsets': ['target'],
230 'dependencies': [
231 'mksnapshot',
232 'js2c',
233 'generate_trig_table',
234 'natives_blob',
235 ],
236 }],
237 ['component=="shared_library"', {
238 'defines': [
239 'V8_SHARED',
240 'BUILDING_V8_SHARED',
241 ],
242 'direct_dependent_settings': {
243 'defines': [
244 'V8_SHARED',
245 'USING_V8_SHARED',
246 ],
247 },
248 }],
249 ],
250 'dependencies': [
251 'v8_base',
252 ],
253 'include_dirs+': [
254 '../..',
255 ],
256 'sources': [
257 '<(SHARED_INTERMEDIATE_DIR)/trig-table.cc',
258 '../../src/natives-external.cc',
259 '../../src/snapshot-external.cc',
260 ],
261 'actions': [
262 {
263 'action_name': 'run_mksnapshot (external)',
264 'inputs': [
265 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot<(EXECUTABLE_SUFFIX)',
266 ],
267 'outputs': [
268 '<(INTERMEDIATE_DIR)/snapshot.cc',
269 '<(PRODUCT_DIR)/snapshot_blob.bin',
270 ],
271 'variables': {
272 'mksnapshot_flags': [
273 '--log-snapshot-positions',
274 '--logfile', '<(INTERMEDIATE_DIR)/snapshot.log',
275 ],
276 'conditions': [
277 ['v8_random_seed!=0', {
278 'mksnapshot_flags': ['--random-seed', '<(v8_random_seed)'],
279 }],
280 ],
281 },
282 'action': [
283 '<@(_inputs)',
284 '<@(mksnapshot_flags)',
285 '<@(INTERMEDIATE_DIR)/snapshot.cc',
286 '--startup_blob', '<(PRODUCT_DIR)/snapshot_blob.bin',
287 ],
288 },
289 ],
290 },
211 { 'target_name': 'generate_trig_table', 291 { 'target_name': 'generate_trig_table',
212 'type': 'none', 292 'type': 'none',
213 'conditions': [ 293 'conditions': [
214 ['want_separate_host_toolset==1', { 294 ['want_separate_host_toolset==1', {
215 'toolsets': ['host'], 295 'toolsets': ['host'],
216 }, { 296 }, {
217 'toolsets': ['target'], 297 'toolsets': ['target'],
218 }], 298 }],
219 ], 299 ],
220 'actions': [ 300 'actions': [
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 '../../src/scanner.cc', 619 '../../src/scanner.cc',
540 '../../src/scanner.h', 620 '../../src/scanner.h',
541 '../../src/scopeinfo.cc', 621 '../../src/scopeinfo.cc',
542 '../../src/scopeinfo.h', 622 '../../src/scopeinfo.h',
543 '../../src/scopes.cc', 623 '../../src/scopes.cc',
544 '../../src/scopes.h', 624 '../../src/scopes.h',
545 '../../src/serialize.cc', 625 '../../src/serialize.cc',
546 '../../src/serialize.h', 626 '../../src/serialize.h',
547 '../../src/small-pointer-list.h', 627 '../../src/small-pointer-list.h',
548 '../../src/smart-pointers.h', 628 '../../src/smart-pointers.h',
549 '../../src/snapshot-common.cc',
550 '../../src/snapshot.h', 629 '../../src/snapshot.h',
630 '../../src/snapshot-source-sink.cc',
631 '../../src/snapshot-source-sink.h',
551 '../../src/spaces-inl.h', 632 '../../src/spaces-inl.h',
552 '../../src/spaces.cc', 633 '../../src/spaces.cc',
553 '../../src/spaces.h', 634 '../../src/spaces.h',
554 '../../src/store-buffer-inl.h', 635 '../../src/store-buffer-inl.h',
555 '../../src/store-buffer.cc', 636 '../../src/store-buffer.cc',
556 '../../src/store-buffer.h', 637 '../../src/store-buffer.h',
557 '../../src/string-search.cc', 638 '../../src/string-search.cc',
558 '../../src/string-search.h', 639 '../../src/string-search.h',
559 '../../src/string-stream.cc', 640 '../../src/string-stream.cc',
560 '../../src/string-stream.h', 641 '../../src/string-stream.h',
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
1077 }], 1158 }],
1078 ['component=="shared_library"', { 1159 ['component=="shared_library"', {
1079 'defines': [ 1160 'defines': [
1080 'BUILDING_V8_SHARED', 1161 'BUILDING_V8_SHARED',
1081 'V8_SHARED', 1162 'V8_SHARED',
1082 ], 1163 ],
1083 }], 1164 }],
1084 ], 1165 ],
1085 }, 1166 },
1086 { 1167 {
1168 'target_name': 'natives_blob',
1169 'type': 'none',
1170 'dependencies': ['js2c'],
1171 'actions': [{
1172 'action_name': 'concatenate_natives_blob',
1173 'inputs': [
1174 '../../tools/concatenate-files.py',
1175 '<(SHARED_INTERMEDIATE_DIR)/libraries.bin',
1176 '<(SHARED_INTERMEDIATE_DIR)/libraries-experimental.bin',
1177 ],
1178 'outputs': [
1179 '<(PRODUCT_DIR)/natives_blob.bin',
1180 ],
1181 'action': ['python', '<@(_inputs)', '<@(_outputs)'],
1182 }],
1183 'conditions': [
1184 ['want_separate_host_toolset==1', {
1185 'toolsets': ['host'],
1186 }, {
1187 'toolsets': ['target'],
1188 }],
1189 ],
1190 },
1191 {
1087 'target_name': 'js2c', 1192 'target_name': 'js2c',
1088 'type': 'none', 1193 'type': 'none',
1089 'conditions': [ 1194 'conditions': [
1090 ['want_separate_host_toolset==1', { 1195 ['want_separate_host_toolset==1', {
1091 'toolsets': ['host'], 1196 'toolsets': ['host'],
1092 }, { 1197 }, {
1093 'toolsets': ['target'], 1198 'toolsets': ['target'],
1094 }], 1199 }],
1095 ['v8_enable_i18n_support==1', { 1200 ['v8_enable_i18n_support==1', {
1096 'variables': { 1201 'variables': {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
1132 '../../src/symbol.js', 1237 '../../src/symbol.js',
1133 '../../src/proxy.js', 1238 '../../src/proxy.js',
1134 '../../src/collection.js', 1239 '../../src/collection.js',
1135 '../../src/collection-iterator.js', 1240 '../../src/collection-iterator.js',
1136 '../../src/generator.js', 1241 '../../src/generator.js',
1137 '../../src/array-iterator.js', 1242 '../../src/array-iterator.js',
1138 '../../src/harmony-string.js', 1243 '../../src/harmony-string.js',
1139 '../../src/harmony-array.js', 1244 '../../src/harmony-array.js',
1140 '../../src/harmony-math.js' 1245 '../../src/harmony-math.js'
1141 ], 1246 ],
1247 'libraries_bin_file': '<(SHARED_INTERMEDIATE_DIR)/libraries.bin',
1248 'libraries_experimental_bin_file': '<(SHARED_INTERMEDIATE_DIR)/libraries -experimental.bin',
1142 }, 1249 },
1143 'actions': [ 1250 'actions': [
1144 { 1251 {
1145 'action_name': 'js2c', 1252 'action_name': 'js2c',
1146 'inputs': [ 1253 'inputs': [
1147 '../../tools/js2c.py', 1254 '../../tools/js2c.py',
1148 '<@(library_files)', 1255 '<@(library_files)',
1149 '<@(i18n_library_files)', 1256 '<@(i18n_library_files)',
1150 ], 1257 ],
1151 'outputs': [ 1258 'outputs': [
1152 '<(SHARED_INTERMEDIATE_DIR)/libraries.cc', 1259 '<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
1153 ], 1260 ],
1154 'action': [ 1261 'action': [
1155 'python', 1262 'python',
1156 '../../tools/js2c.py', 1263 '../../tools/js2c.py',
1157 '<@(_outputs)', 1264 '<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
1158 'CORE', 1265 'CORE',
1159 '<(v8_compress_startup_data)', 1266 '<(v8_compress_startup_data)',
1160 '<@(library_files)', 1267 '<@(library_files)',
1161 '<@(i18n_library_files)', 1268 '<@(i18n_library_files)',
1162 ], 1269 ],
1270 'conditions': [
1271 [ 'v8_use_external_startup_data==1', {
1272 'outputs': ['<@(libraries_bin_file)'],
1273 'action': [
1274 '--startup_blob', '<@(libraries_bin_file)',
1275 ],
1276 }],
1277 ],
1163 }, 1278 },
1164 { 1279 {
1165 'action_name': 'js2c_experimental', 1280 'action_name': 'js2c_experimental',
1166 'inputs': [ 1281 'inputs': [
1167 '../../tools/js2c.py', 1282 '../../tools/js2c.py',
1168 '<@(experimental_library_files)', 1283 '<@(experimental_library_files)',
1169 ], 1284 ],
1170 'outputs': [ 1285 'outputs': [
1171 '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc', 1286 '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc',
1172 ], 1287 ],
1173 'action': [ 1288 'action': [
1174 'python', 1289 'python',
1175 '../../tools/js2c.py', 1290 '../../tools/js2c.py',
1176 '<@(_outputs)', 1291 '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc',
1177 'EXPERIMENTAL', 1292 'EXPERIMENTAL',
1178 '<(v8_compress_startup_data)', 1293 '<(v8_compress_startup_data)',
1179 '<@(experimental_library_files)' 1294 '<@(experimental_library_files)'
1180 ], 1295 ],
1296 'conditions': [
1297 [ 'v8_use_external_startup_data==1', {
1298 'outputs': ['<@(libraries_experimental_bin_file)'],
1299 'action': [
1300 '--startup_blob', '<@(libraries_experimental_bin_file)'
1301 ],
1302 }],
1303 ],
1181 }, 1304 },
1182 ], 1305 ],
1183 }, 1306 },
1184 { 1307 {
1185 'target_name': 'postmortem-metadata', 1308 'target_name': 'postmortem-metadata',
1186 'type': 'none', 1309 'type': 'none',
1187 'variables': { 1310 'variables': {
1188 'heapobject_files': [ 1311 'heapobject_files': [
1189 '../../src/objects.h', 1312 '../../src/objects.h',
1190 '../../src/objects-inl.h', 1313 '../../src/objects-inl.h',
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
1227 }], 1350 }],
1228 ['v8_compress_startup_data=="bz2"', { 1351 ['v8_compress_startup_data=="bz2"', {
1229 'libraries': [ 1352 'libraries': [
1230 '-lbz2', 1353 '-lbz2',
1231 ] 1354 ]
1232 }], 1355 }],
1233 ], 1356 ],
1234 }, 1357 },
1235 ], 1358 ],
1236 } 1359 }
OLDNEW
« no previous file with comments | « tools/concatenate-files.py ('k') | tools/js2c.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698