diff options
author | Oliver Reiche <oliver.reiche@huawei.com> | 2024-12-04 13:26:20 +0100 |
---|---|---|
committer | Oliver Reiche <oliver.reiche@huawei.com> | 2024-12-04 13:26:20 +0100 |
commit | 4f04c9167256c6359e1939a7199901b53b90131f (patch) | |
tree | 6f120c41ec8cfc59acc7f87ebcf0a2cc6698f17c /CC | |
parent | abf2e8c64eeb7300a933cef26d020251468d41f0 (diff) | |
parent | 0c21dfd51b94dedcb9042b53176853bc4e2a3473 (diff) | |
download | rules-cc-4f04c9167256c6359e1939a7199901b53b90131f.tar.gz |
Merge branch 'just-rules' into rules
* rules/oss:
config_file: Support PATH from defaults
Diffstat (limited to 'CC')
-rw-r--r-- | CC/auto/RULES | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/CC/auto/RULES b/CC/auto/RULES index 6ad967f..34886d8 100644 --- a/CC/auto/RULES +++ b/CC/auto/RULES @@ -1238,8 +1238,11 @@ , "string_fields": ["magic_string", "@only", "output"] , "target_fields": ["input"] , "config_vars": ["defines"] - , "imports": {"stage_singleton_field": ["", "stage_singleton_field"]} - , "implicit": {"runner": ["runner"]} + , "imports": + { "stage_singleton_field": ["", "stage_singleton_field"] + , "default-PATH": ["./", "..", "default-PATH"] + } + , "implicit": {"runner": ["runner"], "defaults": [["./", "..", "defaults"]]} , "expression": { "type": "let*" , "bindings": @@ -1314,6 +1317,22 @@ {"type": "CALL_EXPRESSION", "name": "stage_singleton_field"} } ] + , ["PATH", {"type": "CALL_EXPRESSION", "name": "default-PATH"}] + , [ "ENV" + , { "type": "if" + , "cond": {"type": "var", "name": "PATH"} + , "then": + { "type": "singleton_map" + , "key": "PATH" + , "value": + { "type": "join" + , "separator": ":" + , "$1": {"type": "var", "name": "PATH"} + } + } + , "else": {"type": "empty_map"} + } + ] , [ "outfile" , { "type": "ACTION" , "inputs": @@ -1331,6 +1350,7 @@ , {"type": "var", "name": "magic_string"} , {"type": "var", "name": "@only"} ] + , "env": {"type": "var", "name": "ENV"} , "outs": ["out"] } ] |