diff options
author | Oliver Reiche <oliver.reiche@huawei.com> | 2023-04-25 17:35:35 +0200 |
---|---|---|
committer | Oliver Reiche <oliver.reiche@huawei.com> | 2023-04-26 11:31:04 +0200 |
commit | 0d35d779351a30d8b2bb6c27bca94acf56d6143d (patch) | |
tree | 162e65f80a8fcfd459d25cb3596c94b3f380295d /CC/proto/RULES | |
parent | 0d0f1172087fc52edb64dad58a4a3a76f41e37c0 (diff) | |
download | rules-cc-0d35d779351a30d8b2bb6c27bca94acf56d6143d.tar.gz |
rules: Support mixing system/toolchain for protoc/grpc
Diffstat (limited to 'CC/proto/RULES')
-rw-r--r-- | CC/proto/RULES | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/CC/proto/RULES b/CC/proto/RULES index c6568cd..6d2e725 100644 --- a/CC/proto/RULES +++ b/CC/proto/RULES @@ -115,6 +115,46 @@ , "else": {"type": "CALL_EXPRESSION", "name": "base-provides"} } ] + , ["provider", "NON_SYSTEM_TOOLS"] + , ["default", {"type": "empty_map"}] + , [ "NON_SYSTEM_TOOLS" + , { "type": "map_union" + , "$1": + { "type": "++" + , "$1": + [ [{"type": "CALL_EXPRESSION", "name": "base-provides"}] + , { "type": "if" + , "cond": {"type": "FIELD", "name": "PROTOC"} + , "then": + [ { "type": "singleton_map" + , "key": "PROTOC" + , "value": + { "type": "if" + , "cond": {"type": "FIELD", "name": "toolchain"} + , "then": true + , "else": false + } + } + ] + } + , { "type": "if" + , "cond": {"type": "FIELD", "name": "GRPC_PLUGIN"} + , "then": + [ { "type": "singleton_map" + , "key": "GRPC_PLUGIN" + , "value": + { "type": "if" + , "cond": {"type": "FIELD", "name": "toolchain"} + , "then": true + , "else": false + } + } + ] + } + ] + } + } + ] , ["provider", "TOOLCHAIN"] , ["default", {"type": "empty_map"}] , [ "TOOLCHAIN" @@ -171,6 +211,7 @@ , "GRPC_PLUGIN" , "ENV" , "TOOLCHAIN" + , "NON_SYSTEM_TOOLS" , "compile-deps" , "compile-args" , "link-deps" |