diff options
author | Alberto Sartori <alberto.sartori@huawei.com> | 2024-07-22 12:20:46 +0200 |
---|---|---|
committer | Alberto Sartori <alberto.sartori@huawei.com> | 2024-07-23 15:41:45 +0200 |
commit | ed652442176aea086104479bb31aced501df48a2 (patch) | |
tree | 582322cce152505eaac16aff5442fcbefbbe3938 /rules/rust/EXPRESSIONS | |
parent | cda960a4cd846ca97f90b172014fd02206eb74a0 (diff) | |
download | rules-rust-ed652442176aea086104479bb31aced501df48a2.tar.gz |
rules-rust: bugfix: correctly propagate link args of C dependencies
Diffstat (limited to 'rules/rust/EXPRESSIONS')
-rw-r--r-- | rules/rust/EXPRESSIONS | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/rules/rust/EXPRESSIONS b/rules/rust/EXPRESSIONS index 3f23d41..7c5b922 100644 --- a/rules/rust/EXPRESSIONS +++ b/rules/rust/EXPRESSIONS @@ -1243,35 +1243,35 @@ } , "else": {"type": "empty_map"} } - , { "type": "if" - , "cond": - { "type": "==" - , "$1": {"type": "var", "name": "crate_type"} - , "$2": "staticlib" - } - , "then": - { "type": "singleton_map" - , "key": "link-args" - , "value": - { "type": "++" - , "$1": - [ [ { "type": "lookup" + , { "type": "singleton_map" + , "key": "link-args" + , "value": + { "type": "++" + , "$1": + [ { "type": "if" + , "cond": + { "type": "==" + , "$1": {"type": "var", "name": "crate_type"} + , "$2": "staticlib" + } + , "then": + [ { "type": "lookup" , "key": "artifact-name" , "map": {"type": "var", "name": "link result"} } ] - , { "type": "lookup" - , "key": "c-deps-link-args" - , "map": {"type": "var", "name": "link result"} - } - , { "type": "lookup" - , "key": "c-deps-run-libs-args" - , "map": {"type": "var", "name": "link result"} - } - ] - } + , "else": [] + } + , { "type": "lookup" + , "key": "c-deps-link-args" + , "map": {"type": "var", "name": "link result"} + } + , { "type": "lookup" + , "key": "c-deps-run-libs-args" + , "map": {"type": "var", "name": "link result"} + } + ] } - , "else": {"type": "empty_map"} } ] } |