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

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

Issue 315033002: Support external startup data in V8. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix build issue by making sure the target is empty (as opposed to not the chain of depedencies) whe… 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 'conditions': [
1171 [ 'v8_use_external_startup_data==1', {
1172 'dependencies': ['js2c'],
1173 'actions': [{
1174 'action_name': 'concatenate_natives_blob',
1175 'inputs': [
1176 '../../tools/concatenate-files.py',
1177 '<(SHARED_INTERMEDIATE_DIR)/libraries.bin',
1178 '<(SHARED_INTERMEDIATE_DIR)/libraries-experimental.bin',
1179 ],
1180 'outputs': [
1181 '<(PRODUCT_DIR)/natives_blob.bin',
1182 ],
1183 'action': ['python', '<@(_inputs)', '<@(_outputs)'],
1184 }],
1185 }],
1186 ['want_separate_host_toolset==1', {
1187 'toolsets': ['host'],
1188 }, {
1189 'toolsets': ['target'],
1190 }],
1191 ]
1192 },
1193 {
1087 'target_name': 'js2c', 1194 'target_name': 'js2c',
1088 'type': 'none', 1195 'type': 'none',
1089 'conditions': [ 1196 'conditions': [
1090 ['want_separate_host_toolset==1', { 1197 ['want_separate_host_toolset==1', {
1091 'toolsets': ['host'], 1198 'toolsets': ['host'],
1092 }, { 1199 }, {
1093 'toolsets': ['target'], 1200 'toolsets': ['target'],
1094 }], 1201 }],
1095 ['v8_enable_i18n_support==1', { 1202 ['v8_enable_i18n_support==1', {
1096 'variables': { 1203 'variables': {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
1132 '../../src/symbol.js', 1239 '../../src/symbol.js',
1133 '../../src/proxy.js', 1240 '../../src/proxy.js',
1134 '../../src/collection.js', 1241 '../../src/collection.js',
1135 '../../src/collection-iterator.js', 1242 '../../src/collection-iterator.js',
1136 '../../src/generator.js', 1243 '../../src/generator.js',
1137 '../../src/array-iterator.js', 1244 '../../src/array-iterator.js',
1138 '../../src/harmony-string.js', 1245 '../../src/harmony-string.js',
1139 '../../src/harmony-array.js', 1246 '../../src/harmony-array.js',
1140 '../../src/harmony-math.js' 1247 '../../src/harmony-math.js'
1141 ], 1248 ],
1249 'libraries_bin_file': '<(SHARED_INTERMEDIATE_DIR)/libraries.bin',
1250 'libraries_experimental_bin_file': '<(SHARED_INTERMEDIATE_DIR)/libraries -experimental.bin',
1142 }, 1251 },
1143 'actions': [ 1252 'actions': [
1144 { 1253 {
1145 'action_name': 'js2c', 1254 'action_name': 'js2c',
1146 'inputs': [ 1255 'inputs': [
1147 '../../tools/js2c.py', 1256 '../../tools/js2c.py',
1148 '<@(library_files)', 1257 '<@(library_files)',
1149 '<@(i18n_library_files)', 1258 '<@(i18n_library_files)',
1150 ], 1259 ],
1151 'outputs': [ 1260 'outputs': [
1152 '<(SHARED_INTERMEDIATE_DIR)/libraries.cc', 1261 '<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
1153 ], 1262 ],
1154 'action': [ 1263 'action': [
1155 'python', 1264 'python',
1156 '../../tools/js2c.py', 1265 '../../tools/js2c.py',
1157 '<@(_outputs)', 1266 '<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
1158 'CORE', 1267 'CORE',
1159 '<(v8_compress_startup_data)', 1268 '<(v8_compress_startup_data)',
1160 '<@(library_files)', 1269 '<@(library_files)',
1161 '<@(i18n_library_files)', 1270 '<@(i18n_library_files)',
1162 ], 1271 ],
1272 'conditions': [
1273 [ 'v8_use_external_startup_data==1', {
1274 'outputs': ['<@(libraries_bin_file)'],
1275 'action': [
1276 '--startup_blob', '<@(libraries_bin_file)',
1277 ],
1278 }],
1279 ],
1163 }, 1280 },
1164 { 1281 {
1165 'action_name': 'js2c_experimental', 1282 'action_name': 'js2c_experimental',
1166 'inputs': [ 1283 'inputs': [
1167 '../../tools/js2c.py', 1284 '../../tools/js2c.py',
1168 '<@(experimental_library_files)', 1285 '<@(experimental_library_files)',
1169 ], 1286 ],
1170 'outputs': [ 1287 'outputs': [
1171 '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc', 1288 '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc',
1172 ], 1289 ],
1173 'action': [ 1290 'action': [
1174 'python', 1291 'python',
1175 '../../tools/js2c.py', 1292 '../../tools/js2c.py',
1176 '<@(_outputs)', 1293 '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc',
1177 'EXPERIMENTAL', 1294 'EXPERIMENTAL',
1178 '<(v8_compress_startup_data)', 1295 '<(v8_compress_startup_data)',
1179 '<@(experimental_library_files)' 1296 '<@(experimental_library_files)'
1180 ], 1297 ],
1298 'conditions': [
1299 [ 'v8_use_external_startup_data==1', {
1300 'outputs': ['<@(libraries_experimental_bin_file)'],
1301 'action': [
1302 '--startup_blob', '<@(libraries_experimental_bin_file)'
1303 ],
1304 }],
1305 ],
1181 }, 1306 },
1182 ], 1307 ],
1183 }, 1308 },
1184 { 1309 {
1185 'target_name': 'postmortem-metadata', 1310 'target_name': 'postmortem-metadata',
1186 'type': 'none', 1311 'type': 'none',
1187 'variables': { 1312 'variables': {
1188 'heapobject_files': [ 1313 'heapobject_files': [
1189 '../../src/objects.h', 1314 '../../src/objects.h',
1190 '../../src/objects-inl.h', 1315 '../../src/objects-inl.h',
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
1227 }], 1352 }],
1228 ['v8_compress_startup_data=="bz2"', { 1353 ['v8_compress_startup_data=="bz2"', {
1229 'libraries': [ 1354 'libraries': [
1230 '-lbz2', 1355 '-lbz2',
1231 ] 1356 ]
1232 }], 1357 }],
1233 ], 1358 ],
1234 }, 1359 },
1235 ], 1360 ],
1236 } 1361 }
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