summaryrefslogtreecommitdiff
path: root/CC/auto
diff options
context:
space:
mode:
authorOliver Reiche <oliver.reiche@huawei.com>2023-08-16 15:37:21 +0200
committerOliver Reiche <oliver.reiche@huawei.com>2023-08-16 15:37:21 +0200
commitebf3cf04bc80ae7bf083220e63e739bf32151c95 (patch)
tree55528542ed7c08f588ce6ae5389d3c11ca996e19 /CC/auto
parent875296f27c7eec053a8b4f348ab6490441ef6454 (diff)
parent2c5e3a6756fc871bbdde8a34d38cda297519b0f9 (diff)
downloadrules-cc-ebf3cf04bc80ae7bf083220e63e739bf32151c95.tar.gz
Merge branch 'rules/oss' into rules/rules-cc-rules
Diffstat (limited to 'CC/auto')
-rw-r--r--CC/auto/RULES31
1 files changed, 31 insertions, 0 deletions
diff --git a/CC/auto/RULES b/CC/auto/RULES
index 247ee01..0e156c9 100644
--- a/CC/auto/RULES
+++ b/CC/auto/RULES
@@ -156,6 +156,7 @@
, "flags-cc": ["./", "..", "flags-cc"]
, "flags-cxx": ["./", "..", "flags-cxx"]
, "default-ENV": ["./", "..", "default-ENV"]
+ , "default-PATH": ["./", "..", "default-PATH"]
, "default-TOOLCHAIN": ["./", "..", "default-TOOLCHAIN"]
, "default-NON_SYSTEM_TOOLS": ["./", "..", "default-NON_SYSTEM_TOOLS"]
}
@@ -222,6 +223,36 @@
]
}
]
+ , [ "ENV_PATH"
+ , { "type": "lookup"
+ , "map": {"type": "var", "name": "ENV"}
+ , "key": "PATH"
+ }
+ ]
+ , [ "ENV"
+ , { "type": "map_union"
+ , "$1":
+ [ {"type": "var", "name": "ENV"}
+ , { "type": "singleton_map"
+ , "key": "PATH"
+ , "value":
+ { "type": "join"
+ , "separator": ":"
+ , "$1":
+ { "type": "++"
+ , "$1":
+ [ {"type": "CALL_EXPRESSION", "name": "default-PATH"}
+ , { "type": "if"
+ , "cond": {"type": "var", "name": "ENV_PATH"}
+ , "then": [{"type": "var", "name": "ENV_PATH"}]
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ ]
, [ "c.flags"
, { "type": "BLOB"
, "data":