MCPcopy Create free account
hub / github.com/nodejs/node / _AddActionStep

Function _AddActionStep

tools/gyp/pylib/gyp/generator/msvs.py:457–489  ·  view source on GitHub ↗

Merge action into an existing list of actions. Care must be taken so that actions which have overlapping inputs either don't get assigned to the same input, or get collapsed into one. Arguments: actions_dict: dictionary keyed on input name, which maps to a list of dicts d

(actions_dict, inputs, outputs, description, command)

Source from the content-addressed store, hash-verified

455
456
457def _AddActionStep(actions_dict, inputs, outputs, description, command):
458 """Merge action into an existing list of actions.
459
460 Care must be taken so that actions which have overlapping inputs either don't
461 get assigned to the same input, or get collapsed into one.
462
463 Arguments:
464 actions_dict: dictionary keyed on input name, which maps to a list of
465 dicts describing the actions attached to that input file.
466 inputs: list of inputs
467 outputs: list of outputs
468 description: description of the action
469 command: command line to execute
470 """
471 # Require there to be at least one input (call sites will ensure this).
472 assert inputs
473
474 action = {
475 "inputs": inputs,
476 "outputs": outputs,
477 "description": description,
478 "command": command,
479 }
480
481 # Pick where to stick this action.
482 # While less than optimal in terms of build time, attach them to the first
483 # input for now.
484 chosen_input = inputs[0]
485
486 # Add it there.
487 if chosen_input not in actions_dict:
488 actions_dict[chosen_input] = []
489 actions_dict[chosen_input].append(action)
490
491
492def _AddCustomBuildToolForMSVS(

Callers 3

_GenerateExternalRulesFunction · 0.85
_AddActionsFunction · 0.85
_AddCopiesFunction · 0.85

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected