summaryrefslogtreecommitdiff
path: root/CC/test
diff options
context:
space:
mode:
authorOliver Reiche <oliver.reiche@huawei.com>2022-04-26 16:51:01 +0200
committerOliver Reiche <oliver.reiche@huawei.com>2022-04-26 18:24:36 +0200
commit8bbb5274b2779aae44a0c4f76da8df08cf63da84 (patch)
tree5787e11a0e441a23c37976f02b92ab6ff96064bd /CC/test
parent6fa381769ea5ac3505cc202ae442eb7fee35f4ce (diff)
downloadrules-cc-8bbb5274b2779aae44a0c4f76da8df08cf63da84.tar.gz
rules: Add field_artifacts_list and field_runfiles_list
... which are more efficient if the caller wants to perform the union manually (because disjointness should be enforced or additional maps should be added to the union, etc.). As a positive side effect, code reuse is slightly increased by consistently calling these newly introduced expressions for obtaining the artifacts/runfiles from all targets of a target field.
Diffstat (limited to 'CC/test')
-rw-r--r--CC/test/RULES9
1 files changed, 4 insertions, 5 deletions
diff --git a/CC/test/RULES b/CC/test/RULES
index af20510..3f8e236 100644
--- a/CC/test/RULES
+++ b/CC/test/RULES
@@ -58,6 +58,7 @@
]
, "imports":
{ "artifacts": ["./", "../..", "field_artifacts"]
+ , "runfiles_list": ["./", "../..", "field_runfiles_list"]
, "compile-deps": ["./", "..", "compile-deps"]
, "link-deps": ["./", "..", "link-deps"]
, "objects": ["./", "..", "objects"]
@@ -236,11 +237,9 @@
, { "type": "disjoint_map_union"
, "msg": "Data runfiles may not conflict"
, "$1":
- { "type": "foreach"
- , "var": "dep"
- , "range": {"type": "FIELD", "name": "data"}
- , "body":
- {"type": "DEP_RUNFILES", "dep": {"type": "var", "name": "dep"}}
+ { "type": "let*"
+ , "bindings": [["fieldname", "data"]]
+ , "body": {"type": "CALL_EXPRESSION", "name": "runfiles_list"}
}
}
]