From 533b7dec6afc0f6bc675d28be823871fbaa69894 Mon Sep 17 00:00:00 2001 From: Sascha Roloff Date: Tue, 10 Sep 2024 16:33:11 +0200 Subject: Fix CC rules to consume static libraries when building a shared library When a shared library has static-library dependencies, it is linked against these static libraries including all their link arguments. Thus, the "link-deps" as well as the "link-args" provider of the shared library should be empty. --- CC/EXPRESSIONS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CC/EXPRESSIONS b/CC/EXPRESSIONS index 3ca2bee..2da99b2 100644 --- a/CC/EXPRESSIONS +++ b/CC/EXPRESSIONS @@ -2177,8 +2177,8 @@ , [ "cflags-files" , {"type": "CALL_EXPRESSION", "name": "cflags-files-deps"} ] - , ["link-deps", {"type": "CALL_EXPRESSION", "name": "link-deps"}] - , ["link-args", {"type": "CALL_EXPRESSION", "name": "link-args-deps"}] + , ["link-deps", {"type": "empty_map"}] + , ["link-args", []] , [ "run-libs" , { "type": "map_union" , "$1": -- cgit v1.2.3 From 17517c0df575cc9e395f2485e84f8f6112320e26 Mon Sep 17 00:00:00 2001 From: Sascha Roloff Date: Tue, 10 Sep 2024 16:56:10 +0200 Subject: Fix CC rules to not add run-libs-args from deps when building a shared library When a shared library is built that depends on other shared libraries, it instructs its consumers via the "run-link-args" to link only against this library and not also against its dependencies. --- CC/EXPRESSIONS | 1 - 1 file changed, 1 deletion(-) diff --git a/CC/EXPRESSIONS b/CC/EXPRESSIONS index 2da99b2..ffff826 100644 --- a/CC/EXPRESSIONS +++ b/CC/EXPRESSIONS @@ -2194,7 +2194,6 @@ , "$1": [ {"type": "keys", "$1": {"type": "var", "name": "lib"}} , {"type": "var", "name": "ldflags", "default": []} - , {"type": "CALL_EXPRESSION", "name": "run-libs-args-deps"} ] } } -- cgit v1.2.3