|
407 | 407 | '<(mksnapshot_exec)',
|
408 | 408 | ],
|
409 | 409 | 'outputs': [
|
410 |
| - '<(INTERMEDIATE_DIR)/snapshot.cc', |
| 410 | + # snapshot.cc is always built in the 'asm_to_inline_asm' step. |
411 | 411 | '<(INTERMEDIATE_DIR)/embedded.S',
|
412 | 412 | ],
|
413 | 413 | 'conditions': [
|
| 414 | + # When not under Windows, embedded.S will be compiled directly. |
| 415 | + ['OS != "win"', { |
| 416 | + 'process_outputs_as_sources': 1, |
| 417 | + }], |
414 | 418 | ['v8_random_seed', {
|
415 | 419 | 'variables': {
|
416 | 420 | 'mksnapshot_flags': ['--random-seed', '<(v8_random_seed)'],
|
|
450 | 454 | ],
|
451 | 455 | },
|
452 | 456 | {
|
| 457 | + # This action is only useful on Windows. |
| 458 | + # Under non-Windows systems, we effectively ignore |
| 459 | + # the output of this action. |
453 | 460 | 'action_name': 'asm_to_inline_asm',
|
454 | 461 | 'message': 'generating: >@(_outputs)',
|
455 | 462 | 'inputs': [
|
456 | 463 | '<(INTERMEDIATE_DIR)/embedded.S',
|
457 | 464 | ],
|
458 |
| - 'outputs': [ |
| 465 | + 'conditions': [ |
| 466 | + # Under Windows, we need to generate snapshot.cc and embedded.cc. |
| 467 | + ['OS == "win"', { |
| 468 | + 'outputs': [ |
459 | 469 | '<(INTERMEDIATE_DIR)/snapshot.cc',
|
460 | 470 | '<(INTERMEDIATE_DIR)/embedded.cc',
|
| 471 | + ], |
| 472 | + }], |
| 473 | + # Under non-Windows systems, we effectively ignore the output of this |
| 474 | + # action. We do need to build snapshot.cc, however. |
| 475 | + ['OS != "win"', { |
| 476 | + 'outputs': ['<(INTERMEDIATE_DIR)/snapshot.cc'] |
| 477 | + }], |
461 | 478 | ],
|
462 | 479 | 'process_outputs_as_sources': 1,
|
463 | 480 | 'action': [
|
|
0 commit comments