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

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

Issue 506983002: Properly separate host and target builds when using external natives. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Do not invalidate the build by generating the same blobs from multiple targets. Also, make sure v8_… Created 6 years, 3 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 | « no previous file | no next file » | 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 # dependency however the Android toolchain requires libv8_base.a 48 # dependency however the Android toolchain requires libv8_base.a
49 # to appear before libv8_snapshot.a so it's listed explicitly. 49 # to appear before libv8_snapshot.a so it's listed explicitly.
50 'dependencies': ['v8_base', 'v8_snapshot'], 50 'dependencies': ['v8_base', 'v8_snapshot'],
51 }], 51 }],
52 ['v8_use_snapshot!="true" and v8_use_external_startup_data==0', { 52 ['v8_use_snapshot!="true" and v8_use_external_startup_data==0', {
53 # The dependency on v8_base should come from a transitive 53 # The dependency on v8_base should come from a transitive
54 # dependency however the Android toolchain requires libv8_base.a 54 # dependency however the Android toolchain requires libv8_base.a
55 # to appear before libv8_snapshot.a so it's listed explicitly. 55 # to appear before libv8_snapshot.a so it's listed explicitly.
56 'dependencies': ['v8_base', 'v8_nosnapshot'], 56 'dependencies': ['v8_base', 'v8_nosnapshot'],
57 }], 57 }],
58 ['v8_use_external_startup_data==1 and want_separate_host_toolset==1', {
59 'dependencies': ['v8_base', 'v8_external_snapshot'],
60 'target_conditions': [
61 ['_toolset=="host"', {
62 'inputs': [
63 '<(PRODUCT_DIR)/snapshot_blob_host.bin',
64 ],
65 }, {
66 'inputs': [
67 '<(PRODUCT_DIR)/snapshot_blob.bin',
68 ],
69 }],
70 ],
71 }],
58 ['v8_use_external_startup_data==1 and want_separate_host_toolset==0', { 72 ['v8_use_external_startup_data==1 and want_separate_host_toolset==0', {
59 'dependencies': ['v8_base', 'v8_external_snapshot'], 73 'dependencies': ['v8_base', 'v8_external_snapshot'],
60 }], 74 'inputs': [ '<(PRODUCT_DIR)/snapshot_blob.bin', ],
61 ['v8_use_external_startup_data==1 and want_separate_host_toolset==1', {
62 'dependencies': ['v8_base', 'v8_external_snapshot#host'],
63 }], 75 }],
64 ['component=="shared_library"', { 76 ['component=="shared_library"', {
65 'type': '<(component)', 77 'type': '<(component)',
66 'sources': [ 78 'sources': [
67 # Note: on non-Windows we still build this file so that gyp 79 # Note: on non-Windows we still build this file so that gyp
68 # has some sources to link into the component. 80 # has some sources to link into the component.
69 '../../src/v8dll-main.cc', 81 '../../src/v8dll-main.cc',
70 ], 82 ],
71 'include_dirs': [ 83 'include_dirs': [
72 '../..', 84 '../..',
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 'V8_SHARED', 223 'V8_SHARED',
212 ], 224 ],
213 }], 225 }],
214 ] 226 ]
215 }, 227 },
216 { 228 {
217 'target_name': 'v8_external_snapshot', 229 'target_name': 'v8_external_snapshot',
218 'type': 'static_library', 230 'type': 'static_library',
219 'conditions': [ 231 'conditions': [
220 ['want_separate_host_toolset==1', { 232 ['want_separate_host_toolset==1', {
221 'toolsets': ['host'], 233 'toolsets': ['host', 'target'],
222 'dependencies': [ 234 'dependencies': [
223 'mksnapshot#host', 235 'mksnapshot#host',
224 'js2c#host', 236 'js2c#host',
225 'natives_blob#host', 237 'natives_blob',
226 ]}, { 238 ]}, {
227 'toolsets': ['target'], 239 'toolsets': ['target'],
228 'dependencies': [ 240 'dependencies': [
229 'mksnapshot', 241 'mksnapshot',
230 'js2c', 242 'js2c',
231 'natives_blob', 243 'natives_blob',
232 ], 244 ],
233 }], 245 }],
234 ['component=="shared_library"', { 246 ['component=="shared_library"', {
235 'defines': [ 247 'defines': [
(...skipping 17 matching lines...) Expand all
253 'sources': [ 265 'sources': [
254 '../../src/natives-external.cc', 266 '../../src/natives-external.cc',
255 '../../src/snapshot-external.cc', 267 '../../src/snapshot-external.cc',
256 ], 268 ],
257 'actions': [ 269 'actions': [
258 { 270 {
259 'action_name': 'run_mksnapshot (external)', 271 'action_name': 'run_mksnapshot (external)',
260 'inputs': [ 272 'inputs': [
261 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot<(EXECUTABLE_SUFFIX)', 273 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot<(EXECUTABLE_SUFFIX)',
262 ], 274 ],
263 'outputs': [ 275 'conditions': [
264 '<(INTERMEDIATE_DIR)/snapshot.cc', 276 ['want_separate_host_toolset==1', {
265 '<(PRODUCT_DIR)/snapshot_blob.bin', 277 'target_conditions': [
278 ['_toolset=="host"', {
279 'outputs': [
280 '<(INTERMEDIATE_DIR)/snapshot.cc',
281 '<(PRODUCT_DIR)/snapshot_blob_host.bin',
vogelheim 2014/08/29 14:10:55 I'm a bit skeptical here: snapshot.cc and snapshot
rmcilroy 2014/08/29 14:15:47 I think the difference is that snapshot.cc is alre
vogelheim 2014/08/29 14:55:39 Ah, yes, that makes sense. Thanks for the explanat
282 ],
283 }, {
284 'outputs': [
285 '<(INTERMEDIATE_DIR)/snapshot.cc',
286 '<(PRODUCT_DIR)/snapshot_blob.bin',
287 ],
288 }],
289 ],
290 }, {
291 'outputs': [
292 '<(INTERMEDIATE_DIR)/snapshot.cc',
293 '<(PRODUCT_DIR)/snapshot_blob.bin',
294 ],
295 }],
266 ], 296 ],
267 'variables': { 297 'variables': {
268 'mksnapshot_flags': [ 298 'mksnapshot_flags': [
269 '--log-snapshot-positions', 299 '--log-snapshot-positions',
270 '--logfile', '<(INTERMEDIATE_DIR)/snapshot.log', 300 '--logfile', '<(INTERMEDIATE_DIR)/snapshot.log',
271 ], 301 ],
272 'conditions': [ 302 'conditions': [
273 ['v8_random_seed!=0', { 303 ['v8_random_seed!=0', {
274 'mksnapshot_flags': ['--random-seed', '<(v8_random_seed)'], 304 'mksnapshot_flags': ['--random-seed', '<(v8_random_seed)'],
275 }], 305 }],
(...skipping 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after
1337 }, { 1367 }, {
1338 'toolsets': ['target'], 1368 'toolsets': ['target'],
1339 }], 1369 }],
1340 ], 1370 ],
1341 }, 1371 },
1342 { 1372 {
1343 'target_name': 'natives_blob', 1373 'target_name': 'natives_blob',
1344 'type': 'none', 1374 'type': 'none',
1345 'conditions': [ 1375 'conditions': [
1346 [ 'v8_use_external_startup_data==1', { 1376 [ 'v8_use_external_startup_data==1', {
1347 'dependencies': ['js2c'], 1377 'conditions': [
1378 ['want_separate_host_toolset==1', {
1379 'dependencies': ['js2c#host'],
1380 }, {
1381 'dependencies': ['js2c'],
1382 }],
1383 ],
1348 'actions': [{ 1384 'actions': [{
1349 'action_name': 'concatenate_natives_blob', 1385 'action_name': 'concatenate_natives_blob',
1350 'inputs': [ 1386 'inputs': [
1351 '../../tools/concatenate-files.py', 1387 '../../tools/concatenate-files.py',
1352 '<(SHARED_INTERMEDIATE_DIR)/libraries.bin', 1388 '<(SHARED_INTERMEDIATE_DIR)/libraries.bin',
1353 '<(SHARED_INTERMEDIATE_DIR)/libraries-experimental.bin', 1389 '<(SHARED_INTERMEDIATE_DIR)/libraries-experimental.bin',
1354 ], 1390 ],
1355 'outputs': [ 1391 'conditions': [
1356 '<(PRODUCT_DIR)/natives_blob.bin', 1392 ['want_separate_host_toolset==1', {
1393 'target_conditions': [
1394 ['_toolset=="host"', {
1395 'outputs': [
1396 '<(PRODUCT_DIR)/natives_blob_host.bin',
1397 ],
1398 'action': [
1399 'python', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob_host .bin'
1400 ],
1401 }, {
1402 'outputs': [
1403 '<(PRODUCT_DIR)/natives_blob.bin',
1404 ],
1405 'action': [
1406 'python', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob.bin'
1407 ],
1408 }],
1409 ],
1410 }, {
1411 'outputs': [
1412 '<(PRODUCT_DIR)/natives_blob.bin',
1413 ],
1414 'action': [
1415 'python', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob.bin'
1416 ],
1417 }],
1357 ], 1418 ],
1358 'action': ['python', '<@(_inputs)', '<@(_outputs)'],
1359 }], 1419 }],
1360 }], 1420 }],
1361 ['want_separate_host_toolset==1', { 1421 ['want_separate_host_toolset==1', {
1362 'toolsets': ['host'], 1422 'toolsets': ['host', 'target'],
1363 }, { 1423 }, {
1364 'toolsets': ['target'], 1424 'toolsets': ['target'],
1365 }], 1425 }],
1366 ] 1426 ]
1367 }, 1427 },
1368 { 1428 {
1369 'target_name': 'js2c', 1429 'target_name': 'js2c',
1370 'type': 'none', 1430 'type': 'none',
1371 'conditions': [ 1431 'conditions': [
1372 ['want_separate_host_toolset==1', { 1432 ['want_separate_host_toolset==1', {
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
1528 }], 1588 }],
1529 ['v8_compress_startup_data=="bz2"', { 1589 ['v8_compress_startup_data=="bz2"', {
1530 'libraries': [ 1590 'libraries': [
1531 '-lbz2', 1591 '-lbz2',
1532 ] 1592 ]
1533 }], 1593 }],
1534 ], 1594 ],
1535 }, 1595 },
1536 ], 1596 ],
1537 } 1597 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698