summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rules/CC/proto/EXPRESSIONS9
-rw-r--r--rules/CC/proto/RULES1
2 files changed, 10 insertions, 0 deletions
diff --git a/rules/CC/proto/EXPRESSIONS b/rules/CC/proto/EXPRESSIONS
index 118c41a0..6f514964 100644
--- a/rules/CC/proto/EXPRESSIONS
+++ b/rules/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/rules/CC/proto/RULES b/rules/CC/proto/RULES
index 8a0711ee..c6568cd9 100644
--- a/rules/CC/proto/RULES
+++ b/rules/CC/proto/RULES
@@ -99,6 +99,7 @@
}
]
, ["provider", "ENV"]
+ , ["default", {"type": "empty_map"}]
, [ "ENV"
, { "type": "if"
, "cond": {"type": "var", "name": "PATH"}