diff options
Diffstat (limited to 'rules/transitions/EXPRESSIONS')
-rw-r--r-- | rules/transitions/EXPRESSIONS | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/rules/transitions/EXPRESSIONS b/rules/transitions/EXPRESSIONS index fef8542..d1ecefa 100644 --- a/rules/transitions/EXPRESSIONS +++ b/rules/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,39 @@ , "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} + , { "type": "singleton_map" + , "key": "BUILD_OBJECT_ONLY_DROP_OBJECT_LINKING" + , "value": null + } + ] + } + } +, "with fPIC, object-only": + { "doc": + ["Like \"with fPIC\", but also unconditionally setting 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": true} + , { "type": "singleton_map" + , "key": "BUILD_OBJECT_ONLY_DROP_OBJECT_LINKING" + , "value": true + } + ] + } + } , "target properties": { "vars": ["ARCH", "TARGET_ARCH", "ARCH_DISPATCH"] , "expression": |