summaryrefslogtreecommitdiff
path: root/CC/RULES
diff options
context:
space:
mode:
Diffstat (limited to 'CC/RULES')
-rw-r--r--CC/RULES39
1 files changed, 22 insertions, 17 deletions
diff --git a/CC/RULES b/CC/RULES
index 98c5cb4..8af70be 100644
--- a/CC/RULES
+++ b/CC/RULES
@@ -26,7 +26,7 @@
[ "Optional toolchain directory. A collection of artifacts that provide"
, "the tools CC, CXX, and AR (if needed). Note that only artifacts of"
, "the specified targets are considered (no runfiles etc.). Specifying"
- , "this field overlays artifacts from \"base\"."
+ , "this field extends artifacts from \"base\"."
]
, "deps":
[ "Optional CC libraries any CC library and CC binary implicitly depend"
@@ -72,7 +72,8 @@
, "config_vars": ["ARCH", "HOST_ARCH"]
, "imports":
{ "base-provides": "defaults-base-provides"
- , "artifacts": ["./", "..", "field_artifacts"]
+ , "base-provides-list": "defaults-base-provides-list"
+ , "artifacts_list": ["./", "..", "field_artifacts_list"]
, "compile-deps": "compile-deps"
, "compile-args-deps": "compile-args-deps"
, "link-deps": "link-deps"
@@ -224,24 +225,28 @@
, ["provider", "TOOLCHAIN"]
, ["default", {"type": "empty_map"}]
, [ "TOOLCHAIN"
- , { "type": "map_union"
+ , { "type": "disjoint_map_union"
+ , "msg": "toolchain artifacts may not overlap"
, "$1":
- [ {"type": "CALL_EXPRESSION", "name": "base-provides"}
- , { "type": "if"
- , "cond": {"type": "FIELD", "name": "toolchain"}
- , "then":
- { "type": "let*"
- , "bindings":
- [ ["fieldname", "toolchain"]
- , [ "transition"
- , {"type": "CALL_EXPRESSION", "name": "for host"}
+ { "type": "++"
+ , "$1":
+ [ {"type": "CALL_EXPRESSION", "name": "base-provides-list"}
+ , { "type": "if"
+ , "cond": {"type": "FIELD", "name": "toolchain"}
+ , "then":
+ { "type": "let*"
+ , "bindings":
+ [ ["fieldname", "toolchain"]
+ , [ "transition"
+ , {"type": "CALL_EXPRESSION", "name": "for host"}
+ ]
]
- ]
- , "body": {"type": "CALL_EXPRESSION", "name": "artifacts"}
+ , "body":
+ {"type": "CALL_EXPRESSION", "name": "artifacts_list"}
+ }
}
- , "else": {"type": "empty_map"}
- }
- ]
+ ]
+ }
}
]
, [ "CFLAGS"