From f8d12beb459041c15781f18a6b5a0928affb4e7c Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Wed, 24 Jul 2024 11:46:28 +0200 Subject: ["CC", "library"] Add concept of components ... i.e., dependencies that are to be included into the library itself. In this way, a large library (convenient for a user to have single library to care about) can be defined as a collection of smaller libraries. Technically, components are like public dependencies on libraries transitioned to object libraries with the following differences - the header files (i.e., runfiles) of the components become header files of the resulting libary, and - the objects (i.e., artifacts) of the components become objects of the library rather than link dependencies. To achive the transfer of the object to the requesting library, an object library can be instructed to drop the objects from the link arguments; in order to continue to support tranditional object libraries in the style of, e.g., cmake, this is done by a different configuration variable that is transitioned as well. In particular, the object-library test case (using a configure target) can be left unchanged. --- transitions/EXPRESSIONS | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'transitions/EXPRESSIONS') diff --git a/transitions/EXPRESSIONS b/transitions/EXPRESSIONS index 18c5dbc..d1ecefa 100644 --- a/transitions/EXPRESSIONS +++ b/transitions/EXPRESSIONS @@ -51,6 +51,27 @@ , "$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 + } ] } } -- cgit v1.2.3