summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2024-05-27 11:34:06 +0200
committerKlaus Aehlig <klaus.aehlig@huawei.com>2024-05-28 16:00:01 +0200
commit50fe455e91eba52fb429f8d09890e3a419841ebf (patch)
tree86d99b93f1976ae951032cc3d0f9736418feb9e0
parent1e485117529223f9431d280c16f96b2d5773ae03 (diff)
downloadrules-cc-50fe455e91eba52fb429f8d09890e3a419841ebf.tar.gz
["shell", "defaults"] add field "bin dirs"
... to declare directories inside the toolchain that contain additional binaries.
-rw-r--r--shell/RULES19
1 files changed, 17 insertions, 2 deletions
diff --git a/shell/RULES b/shell/RULES
index 73c295f..2ce078e 100644
--- a/shell/RULES
+++ b/shell/RULES
@@ -8,7 +8,7 @@
, "meaningful use of this rule."
]
, "target_fields": ["base", "toolchain"]
- , "string_fields": ["sh", "PATH"]
+ , "string_fields": ["sh", "PATH", "bin dirs"]
, "field_doc":
{ "base": ["Other targets (using the same rule) to inherit values from."]
, "toolchain":
@@ -27,6 +27,10 @@
[ "Paths for looking up system tools."
, "Specifying this field extends values from \"base\"."
]
+ , "bin dirs":
+ [ "Directories of the toolchain that contain additional binaries."
+ , "Shell-specific rules will add those into PATH."
+ ]
}
, "config_vars": ["ARCH", "HOST_ARCH", "TARGET_ARCH"]
, "imports":
@@ -132,12 +136,23 @@
}
}
]
+ , [ "bin dirs"
+ , { "type": "++"
+ , "$1":
+ [ {"type": "FIELD", "name": "bin dirs"}
+ , { "type": "let*"
+ , "bindings": [["provider", "bin dirs"]]
+ , "body": {"type": "CALL_EXPRESSION", "name": "base-provides-++"}
+ }
+ ]
+ }
+ ]
]
, "body":
{ "type": "RESULT"
, "provides":
{ "type": "env"
- , "vars": ["TOOLCHAIN", "sh", "NON_SYSTEM_TOOLS", "PATH"]
+ , "vars": ["TOOLCHAIN", "sh", "NON_SYSTEM_TOOLS", "PATH", "bin dirs"]
}
}
}