From a5a98b35fc9a710e723673946ea5c769274b9ddb Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Tue, 23 Jul 2024 14:45:01 +0200 Subject: ["CC", "library"]: Make object-only a configuration property ... instead of a property of the library itself. An object library is not a meaningful concept in itself; it only exists, because a consumer wants to link the library in its entirety. But consumer-specified properties should be propagated through configuration transitions and the definition of the library should not care about how it is consumed; this is also the approach we follow with respect to building a library position independent. As oposed to position-independent building, however, the property of being included unconditionally is not propagated transitively. --- transitions/EXPRESSIONS | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'transitions') diff --git a/transitions/EXPRESSIONS b/transitions/EXPRESSIONS index fef8542..18c5dbc 100644 --- a/transitions/EXPRESSIONS +++ b/transitions/EXPRESSIONS @@ -24,9 +24,16 @@ [ "Transition that enables BUILD_POSITION_INDEPENDENT if config_field" , "\"shared\" is not empty." ] + , "var": ["BUILD_OBJECT_ONLY"] , "expression": { "type": "if" - , "cond": {"type": "FIELD", "name": "shared"} + , "cond": + { "type": "and" + , "$1": + [ {"type": "FIELD", "name": "shared"} + , {"type": "not", "$1": {"type": "var", "name": "BUILD_OBJECT_ONLY"}} + ] + } , "then": { "type": "singleton_map" , "key": "BUILD_POSITION_INDEPENDENT" @@ -35,6 +42,18 @@ , "else": {"type": "empty_map"} } } +, "with fPIC, not object-only": + { "doc": ["Like \"with fPIC\", but also clearing BUILD_OBJECT_ONLY"] + , "var": ["BUILD_OBJECT_ONLY"] + , "imports": {"with fPIC": "with fPIC"} + , "expression": + { "type": "map_union" + , "$1": + [ {"type": "CALL_EXPRESSION", "name": "with fPIC"} + , {"type": "singleton_map", "key": "BUILD_OBJECT_ONLY", "value": null} + ] + } + } , "target properties": { "vars": ["ARCH", "TARGET_ARCH", "ARCH_DISPATCH"] , "expression": -- cgit v1.2.3