diff options
author | Oliver Reiche <oliver.reiche@huawei.com> | 2023-08-07 15:14:46 +0200 |
---|---|---|
committer | Oliver Reiche <oliver.reiche@huawei.com> | 2023-08-16 15:30:32 +0200 |
commit | 2c5e3a6756fc871bbdde8a34d38cda297519b0f9 (patch) | |
tree | 18a8acb30e9249fdb02405ca54afce3a53c1e92e /transitions/EXPRESSIONS | |
parent | 49a1fc766de1b78427a50f37dbf5650237293067 (diff) | |
download | rules-cc-2c5e3a6756fc871bbdde8a34d38cda297519b0f9.tar.gz |
rules: Support BUILD_ARCH for CC defaults
Diffstat (limited to 'transitions/EXPRESSIONS')
-rw-r--r-- | transitions/EXPRESSIONS | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/transitions/EXPRESSIONS b/transitions/EXPRESSIONS index 4fd0d1e..596b20e 100644 --- a/transitions/EXPRESSIONS +++ b/transitions/EXPRESSIONS @@ -1,13 +1,22 @@ { "for host": - { "vars": ["ARCH", "HOST_ARCH"] + { "vars": ["ARCH", "HOST_ARCH", "TARGET_ARCH"] , "expression": - { "type": "singleton_map" - , "key": "TARGET_ARCH" - , "value": - { "type": "var" - , "name": "HOST_ARCH" - , "default": {"type": "var", "name": "ARCH"} - } + { "type": "let*" + , "bindings": + [ [ "BUILD_ARCH" + , { "type": "var" + , "name": "TARGET_ARCH" + , "default": {"type": "var", "name": "ARCH"} + } + ] + , [ "TARGET_ARCH" + , { "type": "var" + , "name": "HOST_ARCH" + , "default": {"type": "var", "name": "ARCH"} + } + ] + ] + , "body": {"type": "env", "vars": ["BUILD_ARCH", "TARGET_ARCH"]} } } , "target properties": |