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

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: Created 6 years, 7 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
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_target_arch)', 'v8_snapshot'], 50 'dependencies': ['v8_base.<(v8_target_arch)', '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': [ 56 'dependencies': [
56 'v8_base.<(v8_target_arch)', 57 'v8_base.<(v8_target_arch)',
57 'v8_nosnapshot.<(v8_target_arch)', 58 'v8_nosnapshot.<(v8_target_arch)',
58 ], 59 ],
59 }], 60 }],
61 ['v8_use_external_startup_data==1', {
62 'dependencies': [
63 'v8_base.<(v8_target_arch)',
64 'v8_external_snapshot',
65 ],
66 }],
60 ['component=="shared_library"', { 67 ['component=="shared_library"', {
61 'type': '<(component)', 68 'type': '<(component)',
62 'sources': [ 69 'sources': [
63 # Note: on non-Windows we still build this file so that gyp 70 # Note: on non-Windows we still build this file so that gyp
64 # has some sources to link into the component. 71 # has some sources to link into the component.
65 '../../src/v8dll-main.cc', 72 '../../src/v8dll-main.cc',
66 ], 73 ],
67 'defines': [ 74 'defines': [
68 'V8_SHARED', 75 'V8_SHARED',
69 'BUILDING_V8_SHARED', 76 'BUILDING_V8_SHARED',
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 'v8_base.<(v8_target_arch)', 148 'v8_base.<(v8_target_arch)',
142 ], 149 ],
143 'include_dirs+': [ 150 'include_dirs+': [
144 '../../src', 151 '../../src',
145 ], 152 ],
146 'sources': [ 153 'sources': [
147 '<(SHARED_INTERMEDIATE_DIR)/libraries.cc', 154 '<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
148 '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc', 155 '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc',
149 '<(SHARED_INTERMEDIATE_DIR)/trig-table.cc', 156 '<(SHARED_INTERMEDIATE_DIR)/trig-table.cc',
150 '<(INTERMEDIATE_DIR)/snapshot.cc', 157 '<(INTERMEDIATE_DIR)/snapshot.cc',
158 '../../src/snapshot-common.cc',
151 ], 159 ],
152 'actions': [ 160 'actions': [
153 { 161 {
154 'action_name': 'run_mksnapshot', 162 'action_name': 'run_mksnapshot',
155 'inputs': [ 163 'inputs': [
156 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot.<(v8_target_arch)<(EX ECUTABLE_SUFFIX)', 164 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot.<(v8_target_arch)<(EX ECUTABLE_SUFFIX)',
157 ], 165 ],
158 'outputs': [ 166 'outputs': [
159 '<(INTERMEDIATE_DIR)/snapshot.cc', 167 '<(INTERMEDIATE_DIR)/snapshot.cc',
160 ], 168 ],
161 'variables': { 169 'variables': {
162 'mksnapshot_flags': [ 170 'mksnapshot_flags': [
163 '--log-snapshot-positions', 171 '--log-snapshot-positions',
164 '--logfile', '<(INTERMEDIATE_DIR)/snapshot.log', 172 '--logfile', '<(INTERMEDIATE_DIR)/snapshot.log',
165 ], 173 ],
166 'conditions': [ 174 'conditions': [
167 ['v8_random_seed!=0', { 175 ['v8_random_seed!=0', {
168 'mksnapshot_flags': ['--random-seed', '<(v8_random_seed)'], 176 'mksnapshot_flags': ['--random-seed', '<(v8_random_seed)'],
169 }], 177 }],
170 ], 178 ],
171 }, 179 },
172 'action': [ 180 'action': [
173 '<@(_inputs)', 181 '<@(_inputs)',
174 '<@(mksnapshot_flags)', 182 '<@(mksnapshot_flags)',
175 '<@(_outputs)' 183 '<@(INTERMEDIATE_DIR)/snapshot.cc'
176 ], 184 ],
177 }, 185 },
178 ], 186 ],
179 }, 187 },
180 { 188 {
181 'target_name': 'v8_nosnapshot.<(v8_target_arch)', 189 'target_name': 'v8_nosnapshot.<(v8_target_arch)',
182 'type': 'static_library', 190 'type': 'static_library',
183 'dependencies': [ 191 'dependencies': [
184 'v8_base.<(v8_target_arch)', 192 'v8_base.<(v8_target_arch)',
185 ], 193 ],
186 'include_dirs+': [ 194 'include_dirs+': [
187 '../../src', 195 '../../src',
188 ], 196 ],
189 'sources': [ 197 'sources': [
190 '<(SHARED_INTERMEDIATE_DIR)/libraries.cc', 198 '<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
191 '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc', 199 '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc',
192 '<(SHARED_INTERMEDIATE_DIR)/trig-table.cc', 200 '<(SHARED_INTERMEDIATE_DIR)/trig-table.cc',
201 '../../src/snapshot-common.cc',
193 '../../src/snapshot-empty.cc', 202 '../../src/snapshot-empty.cc',
194 ], 203 ],
195 'conditions': [ 204 'conditions': [
196 ['want_separate_host_toolset==1', { 205 ['want_separate_host_toolset==1', {
197 'toolsets': ['host', 'target'], 206 'toolsets': ['host', 'target'],
198 'dependencies': ['js2c#host', 'generate_trig_table#host'], 207 'dependencies': ['js2c#host', 'generate_trig_table#host'],
199 }, { 208 }, {
200 'toolsets': ['target'], 209 'toolsets': ['target'],
201 'dependencies': ['js2c', 'generate_trig_table'], 210 'dependencies': ['js2c', 'generate_trig_table'],
202 }], 211 }],
203 ['component=="shared_library"', { 212 ['component=="shared_library"', {
204 'defines': [ 213 'defines': [
205 'BUILDING_V8_SHARED', 214 'BUILDING_V8_SHARED',
206 'V8_SHARED', 215 'V8_SHARED',
207 ], 216 ],
208 }], 217 }],
209 ] 218 ]
210 }, 219 },
220 {
221 'target_name': 'v8_external_snapshot',
222 'type': 'static_library',
223 'dependencies': [
224 'v8_base.<(v8_target_arch)',
225 'mksnapshot.<(v8_target_arch)',
226 'natives_blob',
227 ],
228 'include_dirs+': [
229 '../../src',
230 ],
231 'sources': [
232 '<(SHARED_INTERMEDIATE_DIR)/trig-table.cc',
233 '../../src/natives-external.cc',
234 '../../src/snapshot-external.cc',
235 ],
236 'conditions': [
237 ['want_separate_host_toolset==1', {
238 'toolsets': ['host', 'target'],
239 'dependencies': [
240 'js2c#host',
241 'generate_trig_table#host',
242 'mksnapshot.<(v8_target_arch)#host'
243 ]}, {
244 'toolsets': ['target'],
245 'dependencies': [
246 'js2c',
247 'generate_trig_table',
248 'mksnapshot.<(v8_target_arch)'
249 ]}],
250 ['component=="shared_library"', {
251 'defines': [
252 'BUILDING_V8_SHARED',
253 'V8_SHARED',
254 ],
255 }],
256 ],
257 'actions': [
258 {
259 'action_name': 'run_mksnapshot (external)',
260 'inputs': [
261 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot.<(v8_target_arch)<(EX ECUTABLE_SUFFIX)',
262 ],
263 'outputs': [
264 '<(INTERMEDIATE_DIR)/snapshot.cc',
265 '<(INTERMEDIATE_DIR)/snapshot_blob.bin',
266 ],
267 'variables': {
268 'mksnapshot_flags': [
269 '--log-snapshot-positions',
270 '--logfile', '<(INTERMEDIATE_DIR)/snapshot.log',
271 ],
272 'conditions': [
273 ['v8_random_seed!=0', {
274 'mksnapshot_flags': ['--random-seed', '<(v8_random_seed)'],
275 }],
276 ],
277 },
278 'action': [
279 '<@(_inputs)',
280 '<@(mksnapshot_flags)',
281 '<@(INTERMEDIATE_DIR)/snapshot.cc',
282 '--startup_blob', '<(INTERMEDIATE_DIR)/snapshot_blob.bin',
283 ],
284 },
285 ],
286 },
211 { 'target_name': 'generate_trig_table', 287 { 'target_name': 'generate_trig_table',
212 'type': 'none', 288 'type': 'none',
213 'conditions': [ 289 'conditions': [
214 ['want_separate_host_toolset==1', { 290 ['want_separate_host_toolset==1', {
215 'toolsets': ['host'], 291 'toolsets': ['host'],
216 }, { 292 }, {
217 'toolsets': ['target'], 293 'toolsets': ['target'],
218 }], 294 }],
219 ], 295 ],
220 'actions': [ 296 'actions': [
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 '../../src/scanner.cc', 613 '../../src/scanner.cc',
538 '../../src/scanner.h', 614 '../../src/scanner.h',
539 '../../src/scopeinfo.cc', 615 '../../src/scopeinfo.cc',
540 '../../src/scopeinfo.h', 616 '../../src/scopeinfo.h',
541 '../../src/scopes.cc', 617 '../../src/scopes.cc',
542 '../../src/scopes.h', 618 '../../src/scopes.h',
543 '../../src/serialize.cc', 619 '../../src/serialize.cc',
544 '../../src/serialize.h', 620 '../../src/serialize.h',
545 '../../src/small-pointer-list.h', 621 '../../src/small-pointer-list.h',
546 '../../src/smart-pointers.h', 622 '../../src/smart-pointers.h',
547 '../../src/snapshot-common.cc',
548 '../../src/snapshot.h', 623 '../../src/snapshot.h',
624 '../../src/snapshot-source-sink.cc',
jochen (gone - plz use gerrit) 2014/05/23 11:44:44 can you do those changes (adding/removing files) i
vogelheim 2014/05/26 12:36:03 Done.
625 '../../src/snapshot-source-sink.h',
549 '../../src/spaces-inl.h', 626 '../../src/spaces-inl.h',
550 '../../src/spaces.cc', 627 '../../src/spaces.cc',
551 '../../src/spaces.h', 628 '../../src/spaces.h',
552 '../../src/store-buffer-inl.h', 629 '../../src/store-buffer-inl.h',
553 '../../src/store-buffer.cc', 630 '../../src/store-buffer.cc',
554 '../../src/store-buffer.h', 631 '../../src/store-buffer.h',
555 '../../src/string-search.cc', 632 '../../src/string-search.cc',
556 '../../src/string-search.h', 633 '../../src/string-search.h',
557 '../../src/string-stream.cc', 634 '../../src/string-stream.cc',
558 '../../src/string-stream.h', 635 '../../src/string-stream.h',
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
1044 }], 1121 }],
1045 ['component=="shared_library"', { 1122 ['component=="shared_library"', {
1046 'defines': [ 1123 'defines': [
1047 'BUILDING_V8_SHARED', 1124 'BUILDING_V8_SHARED',
1048 'V8_SHARED', 1125 'V8_SHARED',
1049 ], 1126 ],
1050 }], 1127 }],
1051 ], 1128 ],
1052 }, 1129 },
1053 { 1130 {
1131 'target_name': 'natives_blob',
1132 'type': 'none',
1133 'actions': [{
1134 'action_name': 'concatenate_natives_blob',
1135 'inputs': [
1136 '<(SHARED_INTERMEDIATE_DIR)/libraries.bin',
jochen (gone - plz use gerrit) 2014/05/23 11:44:44 I think we want those in <(PRODUCT_DIR)
vogelheim 2014/05/26 12:36:03 Done, but only for those two files that are meant
1137 '<(SHARED_INTERMEDIATE_DIR)/libraries-experimental.bin',
1138 ],
1139 'outputs': [
1140 '<(SHARED_INTERMEDIATE_DIR)/natives_blob.bin',
1141 ],
1142 'action': [
1143 'bash',
jochen (gone - plz use gerrit) 2014/05/23 11:44:44 there's no bash on windows. gyp has some magic to
vogelheim 2014/05/26 12:36:03 Hmm... I got the idea from code search: https://co
1144 '-c',
1145 'cat <@(_inputs) > <@(_outputs)',
1146 ],
1147 }],
1148 },
1149 {
1054 'target_name': 'js2c', 1150 'target_name': 'js2c',
1055 'type': 'none', 1151 'type': 'none',
1056 'conditions': [ 1152 'conditions': [
1057 ['want_separate_host_toolset==1', { 1153 ['want_separate_host_toolset==1', {
1058 'toolsets': ['host'], 1154 'toolsets': ['host'],
1059 }, { 1155 }, {
1060 'toolsets': ['target'], 1156 'toolsets': ['target'],
1061 }], 1157 }],
1062 ['v8_enable_i18n_support==1', { 1158 ['v8_enable_i18n_support==1', {
1063 'variables': { 1159 'variables': {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
1098 '../../src/macros.py', 1194 '../../src/macros.py',
1099 '../../src/symbol.js', 1195 '../../src/symbol.js',
1100 '../../src/proxy.js', 1196 '../../src/proxy.js',
1101 '../../src/collection.js', 1197 '../../src/collection.js',
1102 '../../src/generator.js', 1198 '../../src/generator.js',
1103 '../../src/array-iterator.js', 1199 '../../src/array-iterator.js',
1104 '../../src/harmony-string.js', 1200 '../../src/harmony-string.js',
1105 '../../src/harmony-array.js', 1201 '../../src/harmony-array.js',
1106 '../../src/harmony-math.js' 1202 '../../src/harmony-math.js'
1107 ], 1203 ],
1204 'libraries_bin_file': '<(SHARED_INTERMEDIATE_DIR)/libraries.bin',
1205 'libraries_experimental_bin_file': '<(SHARED_INTERMEDIATE_DIR)/libraries -experimental.bin',
1108 }, 1206 },
1109 'actions': [ 1207 'actions': [
1110 { 1208 {
1111 'action_name': 'js2c', 1209 'action_name': 'js2c',
1112 'inputs': [ 1210 'inputs': [
1113 '../../tools/js2c.py', 1211 '../../tools/js2c.py',
1114 '<@(library_files)', 1212 '<@(library_files)',
1115 '<@(i18n_library_files)', 1213 '<@(i18n_library_files)',
1116 ], 1214 ],
1117 'outputs': [ 1215 'outputs': [
1118 '<(SHARED_INTERMEDIATE_DIR)/libraries.cc', 1216 '<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
1119 ], 1217 ],
1120 'action': [ 1218 'action': [
1121 'python', 1219 'python',
1122 '../../tools/js2c.py', 1220 '../../tools/js2c.py',
1123 '<@(_outputs)', 1221 '<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
1124 'CORE', 1222 'CORE',
1125 '<(v8_compress_startup_data)', 1223 '<(v8_compress_startup_data)',
1126 '<@(library_files)', 1224 '<@(library_files)',
1127 '<@(i18n_library_files)', 1225 '<@(i18n_library_files)',
1128 ], 1226 ],
1227 'conditions': [
1228 [ 'v8_use_external_startup_data==1', {
1229 'outputs': ['<@(libraries_bin_file)'],
1230 'action': [
1231 '--startup_blob', '<@(libraries_bin_file)',
1232 ],
1233 }],
1234 ],
1129 }, 1235 },
1130 { 1236 {
1131 'action_name': 'js2c_experimental', 1237 'action_name': 'js2c_experimental',
1132 'inputs': [ 1238 'inputs': [
1133 '../../tools/js2c.py', 1239 '../../tools/js2c.py',
1134 '<@(experimental_library_files)', 1240 '<@(experimental_library_files)',
1135 ], 1241 ],
1136 'outputs': [ 1242 'outputs': [
1137 '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc', 1243 '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc',
1138 ], 1244 ],
1139 'action': [ 1245 'action': [
1140 'python', 1246 'python',
1141 '../../tools/js2c.py', 1247 '../../tools/js2c.py',
1142 '<@(_outputs)', 1248 '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc',
1143 'EXPERIMENTAL', 1249 'EXPERIMENTAL',
1144 '<(v8_compress_startup_data)', 1250 '<(v8_compress_startup_data)',
1145 '<@(experimental_library_files)' 1251 '<@(experimental_library_files)'
1146 ], 1252 ],
1253 'conditions': [
1254 [ 'v8_use_external_startup_data==1', {
1255 'outputs': ['<@(libraries_experimental_bin_file)'],
1256 'action': [
1257 '--startup_blob', '<@(libraries_experimental_bin_file)'
1258 ],
1259 }],
1260 ],
1147 }, 1261 },
1148 ], 1262 ],
1149 }, 1263 },
1150 { 1264 {
1151 'target_name': 'postmortem-metadata', 1265 'target_name': 'postmortem-metadata',
1152 'type': 'none', 1266 'type': 'none',
1153 'variables': { 1267 'variables': {
1154 'heapobject_files': [ 1268 'heapobject_files': [
1155 '../../src/objects.h', 1269 '../../src/objects.h',
1156 '../../src/objects-inl.h', 1270 '../../src/objects-inl.h',
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
1196 }], 1310 }],
1197 ['v8_compress_startup_data=="bz2"', { 1311 ['v8_compress_startup_data=="bz2"', {
1198 'libraries': [ 1312 'libraries': [
1199 '-lbz2', 1313 '-lbz2',
1200 ] 1314 ]
1201 }], 1315 }],
1202 ], 1316 ],
1203 }, 1317 },
1204 ], 1318 ],
1205 } 1319 }
OLDNEW
« src/snapshot-source-sink.h ('K') | « src/snapshot-source-sink.cc ('k') | tools/js2c.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698