diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-07-23 14:45:01 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-07-25 12:15:52 +0200 |
commit | a5a98b35fc9a710e723673946ea5c769274b9ddb (patch) | |
tree | 278a313cd8c1dd73f02bf9b2c981070a6f3d687a /transitions | |
parent | 6fc2c2f66740c533d80990659cfce29b7db07eda (diff) | |
download | rules-cc-a5a98b35fc9a710e723673946ea5c769274b9ddb.tar.gz |
["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.
Diffstat (limited to 'transitions')
-rw-r--r-- | transitions/EXPRESSIONS | 21 |
1 files changed, 20 insertions, 1 deletions
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": |