From c4ff7d76b2ca73017d2d96923437de7a1d0aa71d Mon Sep 17 00:00:00 2001 From: Oliver Reiche Date: Tue, 6 Dec 2022 12:06:55 +0100 Subject: rules: Implement ldflags for (shared) libraries --- CC/EXPRESSIONS | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'CC/EXPRESSIONS') diff --git a/CC/EXPRESSIONS b/CC/EXPRESSIONS index 2998fa8..504e55a 100644 --- a/CC/EXPRESSIONS +++ b/CC/EXPRESSIONS @@ -681,6 +681,7 @@ , "private-hdrs" , "cflags" , "private-cflags" + , "ldflags" , "private-ldflags" , "stage" , "extra-provides" @@ -721,6 +722,7 @@ { "type": "++" , "$1": [ {"type": "keys", "$1": {"type": "var", "name": "lib"}} + , {"type": "var", "name": "ldflags", "default": []} , {"type": "var", "name": "private-ldflags", "default": []} , {"type": "CALL_EXPRESSION", "name": "link-args-deps"} ] @@ -936,6 +938,7 @@ , "private-hdrs" , "cflags" , "private-cflags" + , "ldflags" , "private-ldflags" , "soversion" , "extra-provides" @@ -977,7 +980,8 @@ , "$1": { "type": "++" , "$1": - [ {"type": "var", "name": "private-ldflags", "default": []} + [ {"type": "var", "name": "ldflags", "default": []} + , {"type": "var", "name": "private-ldflags", "default": []} , {"type": "CALL_EXPRESSION", "name": "run-libs-args-deps"} ] } @@ -1008,7 +1012,16 @@ } ] , [ "run-libs-args" - , {"type": "keys", "$1": {"type": "var", "name": "lib"}} + , { "type": "nub_right" + , "$1": + { "type": "++" + , "$1": + [ {"type": "keys", "$1": {"type": "var", "name": "lib"}} + , {"type": "var", "name": "ldflags", "default": []} + , {"type": "CALL_EXPRESSION", "name": "run-libs-args-deps"} + ] + } + } ] ] , "body": -- cgit v1.2.3