From 94588c2ceebca3328d3b84566306c91a8600fae6 Mon Sep 17 00:00:00 2001
From: Googler
+ See the definition of dependencies for more information.
+
+ The build system ensures these prerequisites are built before running the
+
+ All tools and their data dependencies are consolidated into a single tree
+ within which the command can use relative paths. The working directory will
+ be the root of that unified tree.
+
+ The template can use the following variables:
+ label
in the extra_actions
argument
+ of action_listener
rules.
+ */
return builder
+ /*
+ A list of tool
dependencies for this rule.
+ ${SYNOPSIS}
+ extra_action
command; they are built using the
+ host
configuration, since
+ they must run as a tool during the build itself. The path of an individual
+ tools
target //x:y
can be obtained using
+ $(location //x:y)
.
+ extra_action
command.
+ ${SYNOPSIS}
+
+
+ extra_action
.
+ Used to generate a unique output file.
+
+ Like genrule cmd attribute with the following differences: +
++ No heuristic label expansion. Only labels using $(location ...) are expanded. +
+
+ An additional pass is applied to the string to replace all
+ occurrences of the outputs created from the out_templates
+ attribute. All occurrences of $(output out_template)
+ are replaced with the path to the file denoted by label
.
+
+ E.g. out_template $(ACTION_ID).analysis
+ can be matched with $(output $(ACTION_ID).analysis)
.
+
+ In effect, this is the same substitution as $(location)
+ but with a different scope.
+
extra_action
requires the output of the
+ original action to be present as input to this extra_action
.
+ ${SYNOPSIS}
+ + When true (default false), the extra_action can assume that the + original action outputs are available as part of its inputs. +
+ */ .add(attr("requires_action_output", BOOLEAN)) .removeAttribute("deps") .removeAttribute(":action_listener") .build(); } } + +/* + +${ATTRIBUTE_SIGNATURE} + +
+ An extra_action
rule doesn't produce any meaningful output
+ when specified as a regular build target. Instead, it allows tool developers
+ to insert additional actions into the build graph that shadow existing actions.
+
+ See action_listener
for details
+ on how to enable extra_action
s in Bazel.
+
+ The extra_action
s run as a command-line. The command-line tool gets
+ access to a file containing a protocol buffer as $(EXTRA_ACTION_FILE)
+ with detailed information on the original action it is shadowing.
+ It also has access to all the input files the original action has access to.
+