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
commit91c21de2706b7705a23a328d7fa1fa3944a0d223 (patch)
treeb61c383255011ecd7e19cc472d2ce5be967b8409
parentc24953b8145832f4534383f55fa3edbbfd3a7fd4 (diff)
downloadjustbuild-91c21de2706b7705a23a328d7fa1fa3944a0d223.tar.gz
rules: Fix propagation of PATH for protoc
-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"}