summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Reiche <oliver.reiche@huawei.com>2023-04-25 11:05:14 +0200
committerOliver Reiche <oliver.reiche@huawei.com>2023-04-26 10:30:18 +0200
commit0d0f1172087fc52edb64dad58a4a3a76f41e37c0 (patch)
tree98883c8541b0c47674ca762475153c57ea471fe0
parent09c9aafa8efafc8bcbb0e26d49a2252816d6948b (diff)
downloadrules-cc-0d0f1172087fc52edb64dad58a4a3a76f41e37c0.tar.gz
rules: Fix propagation of PATH for protoc
-rw-r--r--CC/proto/EXPRESSIONS9
-rw-r--r--CC/proto/RULES1
2 files changed, 10 insertions, 0 deletions
diff --git a/CC/proto/EXPRESSIONS b/CC/proto/EXPRESSIONS
index 118c41a..6f51496 100644
--- a/CC/proto/EXPRESSIONS
+++ b/CC/proto/EXPRESSIONS
@@ -153,6 +153,14 @@
}
}
]
+ , [ "protoc-ENV"
+ , { "type": "map_union"
+ , "$1":
+ [ {"type": "CALL_EXPRESSION", "name": "default-ENV"}
+ , {"type": "var", "name": "ENV", "default": {"type": "empty_map"}}
+ ]
+ }
+ ]
, ["protoc-deps", {"type": "CALL_EXPRESSION", "name": "protoc-deps"}]
, [ "proto srcs"
, { "type": "disjoint_map_union"
@@ -258,6 +266,7 @@
}
, "outs": {"type": "var", "name": "outs"}
, "cmd": {"type": "var", "name": "cmd"}
+ , "env": {"type": "var", "name": "protoc-ENV"}
}
]
, [ "srcs"
diff --git a/CC/proto/RULES b/CC/proto/RULES
index 8a0711e..c6568cd 100644
--- a/CC/proto/RULES
+++ b/CC/proto/RULES
@@ -99,6 +99,7 @@
}
]
, ["provider", "ENV"]
+ , ["default", {"type": "empty_map"}]
, [ "ENV"
, { "type": "if"
, "cond": {"type": "var", "name": "PATH"}