diff options
author | Oliver Reiche <oliver.reiche@huawei.com> | 2023-08-30 17:03:14 +0200 |
---|---|---|
committer | Oliver Reiche <oliver.reiche@huawei.com> | 2023-08-30 19:01:12 +0200 |
commit | 4118e0b9930d11f6062751db4f1656e8cc2a680a (patch) | |
tree | a839d9d63048f38f596e4613fdf5d11bd22b4ca2 /CC/foreign/shell/EXPRESSIONS | |
parent | a27d18f2265c74804842c1170396dbc273c9e1c9 (diff) | |
download | rules-cc-4118e0b9930d11f6062751db4f1656e8cc2a680a.tar.gz |
foreign: Implement 'expand_exec' via POSIX shell
... and coreutils by default. This has the advantage that no
C compiler and no specific toolchain definition is required
to build rule-internal tools. 'expand_exec' is provided via
an implicit target with proper config transition for host,
so it could be overwritten by the rule user. The C code of
the previous implementation is still kept as an example.
Diffstat (limited to 'CC/foreign/shell/EXPRESSIONS')
-rw-r--r-- | CC/foreign/shell/EXPRESSIONS | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/CC/foreign/shell/EXPRESSIONS b/CC/foreign/shell/EXPRESSIONS index d5f9527..2f05497 100644 --- a/CC/foreign/shell/EXPRESSIONS +++ b/CC/foreign/shell/EXPRESSIONS @@ -18,6 +18,7 @@ , "PREFIX" , "BUILD_POSITION_INDEPENDENT" , "TIMEOUT_SCALE" + , "expand_exec" ] , "imports": { "artifacts": ["", "field_artifacts"] @@ -31,7 +32,6 @@ , "default-PATH": ["CC", "default-PATH"] , "default-TOOLCHAIN": ["CC", "default-TOOLCHAIN"] , "default-NON_SYSTEM_TOOLS": ["CC", "default-NON_SYSTEM_TOOLS"] - , "expand_exec_tool": ["./", "..", "expand_exec_tool"] , "foreign-MAKE": ["CC/foreign", "default-MAKE"] , "foreign-CMAKE": ["CC/foreign", "default-CMAKE"] , "foreign-PATH": ["CC/foreign", "default-PATH"] @@ -42,10 +42,7 @@ , "expression": { "type": "let*" , "bindings": - [ [ "expand_exec" - , {"type": "CALL_EXPRESSION", "name": "expand_exec_tool"} - ] - , ["TOOLCHAIN_DIR", "toolchain"] + [ ["TOOLCHAIN_DIR", "toolchain"] , [ "TOOLCHAIN" , { "type": "disjoint_map_union" , "msg": "Toolchain trees may not overlap" |