aboutsummaryrefslogtreecommitdiffhomepage
path: root/site/index.html
diff options
context:
space:
mode:
authorGravatar Han-Wen Nienhuys <hanwen@google.com>2016-01-15 15:54:12 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2016-01-15 22:29:37 +0000
commit67e6f98d7659ac41154f93c39e548ba0ecc43c80 (patch)
treeaa1804d5058d3e0d53c58ab1af4e6301da1fd190 /site/index.html
parent8cc0541da1ec912568c8df2fc13a9b72b668cda2 (diff)
Add native.rule(NAME), which returns the attributes of a previously defined rule.
Add native.rules(), which returns all previously defined rules. These primitives can be used to write Skylark extensions that aggregate over the contents of a BUILD file, eg. def instantiate_if_needed(name): n = name + "_wrapped" if not native.rule(n): py_test(name = n , ... ) def archive_cc_src_files(tag): all_src = [] for r in native.rules().values(): if tag in r["tags"] and r["kind"] == "cc_library": all_src.append(r["srcs"]) native.genrule(cmd = "zip $@ $^", srcs = all_src, outs = ["out.zip"]) RELNOTES: Support aggregation over existing rules in Skylark extensions through native.rules and native.rule. -- MOS_MIGRATED_REVID=112249050
Diffstat (limited to 'site/index.html')
0 files changed, 0 insertions, 0 deletions