diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-07-01 12:06:37 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-07-01 17:20:56 +0200 |
commit | 3dd8dde50bfa107a00b7718d9e49347501ef477e (patch) | |
tree | 40400430745a68057dc9c7e8e17d603a4ac4be4b /rules | |
parent | 12b03432adf5e3d2fab60aa07d88756add9801c3 (diff) | |
download | justbuild-3dd8dde50bfa107a00b7718d9e49347501ef477e.tar.gz |
["shell", "defaults"]: support "bin dirs"
Diffstat (limited to 'rules')
-rw-r--r-- | rules/shell/RULES | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/rules/shell/RULES b/rules/shell/RULES index 73c295f6..2ce078ef 100644 --- a/rules/shell/RULES +++ b/rules/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"] } } } |