diff options
author | Oliver Reiche <oliver.reiche@huawei.com> | 2023-11-17 19:33:28 +0100 |
---|---|---|
committer | Oliver Reiche <oliver.reiche@huawei.com> | 2023-11-20 16:01:56 +0100 |
commit | 779354b0f9e37c71d4c2b15b62d4d34d1e610a48 (patch) | |
tree | df4825f2f4828c86cb09ba711326f3988a2016d2 | |
parent | 7f72f33c498ba39f5f4900642b63ec6e89c471e6 (diff) | |
download | rules-cc-779354b0f9e37c71d4c2b15b62d4d34d1e610a48.tar.gz |
prebuilt: Consider "deps" for flag reader inputs
... so that if e.g., libfoo depends on libbar via "deps",
the flag "-lbar" should be filtered out from the flag file
generated via pkg-config from file foo.pc. Omitting these
flags is always correct, due to those libraries being part
of the explicit link dependencies already.
-rw-r--r-- | CC/prebuilt/EXPRESSIONS | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/CC/prebuilt/EXPRESSIONS b/CC/prebuilt/EXPRESSIONS index 7b35c21..b84e494 100644 --- a/CC/prebuilt/EXPRESSIONS +++ b/CC/prebuilt/EXPRESSIONS @@ -208,18 +208,7 @@ } } ] - , [ "run-libs" - , { "type": "map_union" - , "$1": - [ { "type": "if" - , "cond": {"type": "var", "name": "shared"} - , "then": {"type": "var", "name": "libs"} - , "else": {"type": "empty_map"} - } - , {"type": "CALL_EXPRESSION", "name": "run-libs-deps"} - ] - } - ] + , ["run-libs", {"type": "CALL_EXPRESSION", "name": "run-libs-deps"}] , [ "run-libs-args" , { "type": "nub_right" , "$1": @@ -300,6 +289,8 @@ { "type": "map_union" , "$1": [ {"type": "var", "name": "libs"} + , {"type": "var", "name": "link-deps"} + , {"type": "var", "name": "run-libs"} , { "type": "to_subdir" , "subdir": "pkgconfig" , "flat": true @@ -428,6 +419,18 @@ ] } ] + , [ "run-libs" + , { "type": "map_union" + , "$1": + [ { "type": "if" + , "cond": {"type": "var", "name": "shared"} + , "then": {"type": "var", "name": "libs"} + , "else": {"type": "empty_map"} + } + , {"type": "var", "name": "run-libs"} + ] + } + ] , [ "run-libs-args" , { "type": "++" , "$1": |