8d4f7612b2
maprule() is an improved version of native.genrule(), with the following advantages: - Maprule can process source files in parallel, creating separate actions for each of them. - Maprule does not require declaring all output files. Instead you declare templates for the output files yielded for each source. Therefore N source files and M templates yield N*M outputs. - Maprule supports both Bash and cmd.exe syntax for its commands via the specialized rules bash_maprule and cmd_maprule. - Maprule's cmd attribute does deliberately not support $(location) expression nor Make Variables, in order to avoid issues and challenges with quoting. (In case of cmd.exe passing empty arguments is impossible). These paths can be passed as envvars instead. - Maprule's add_env attribute does support $(location) expressions (and some extra placeholders) and is the idiomatic way to pass execpaths of labels in "tools" or "srcs" (the shared sources available for all actions) to the command. See https://github.com/bazelbuild/bazel/issues/4319 |
||
---|---|---|
.. | ||
BUILD | ||
maprule.bzl | ||
maprule_private.bzl | ||
maprule_testing.bzl |