diff options
Diffstat (limited to 'CC/RULES')
-rw-r--r-- | CC/RULES | 134 |
1 files changed, 130 insertions, 4 deletions
@@ -88,6 +88,8 @@ , "compile-args-deps": "compile-args-deps" , "link-deps": "link-deps" , "link-args-deps": "link-args-deps" + , "run-libs-deps": "run-libs-deps" + , "run-libs-args-deps": "run-libs-args-deps" , "cflags-files-deps": "cflags-files-deps" , "ldflags-files-deps": "ldflags-files-deps" , "for host": ["transitions", "for host"] @@ -293,6 +295,10 @@ ] , ["link-deps", {"type": "CALL_EXPRESSION", "name": "link-deps"}] , ["link-args", {"type": "CALL_EXPRESSION", "name": "link-args-deps"}] + , ["run-libs", {"type": "CALL_EXPRESSION", "name": "run-libs-deps"}] + , [ "run-libs-args" + , {"type": "CALL_EXPRESSION", "name": "run-libs-args-deps"} + ] , [ "cflags-files" , {"type": "CALL_EXPRESSION", "name": "cflags-files-deps"} ] @@ -320,6 +326,8 @@ , "compile-args" , "link-deps" , "link-args" + , "run-libs" + , "run-libs-args" , "package" ] } @@ -329,7 +337,14 @@ , "library": { "doc": ["A C++ library"] , "target_fields": - ["srcs", "hdrs", "private-hdrs", "deps", "private-deps", "proto"] + [ "srcs" + , "hdrs" + , "private-hdrs" + , "deps" + , "private-deps" + , "proto" + , "private-proto" + ] , "string_fields": [ "name" , "stage" @@ -338,18 +353,24 @@ , "private-defines" , "cflags" , "private-cflags" + , "ldflags" , "private-ldflags" + , "soversion" , "pkg-name" ] + , "config_fields": ["shared", "object_only"] , "config_vars": [ "CC" , "CXX" , "CFLAGS" , "CXXFLAGS" + , "LDFLAGS" , "ADD_CFLAGS" , "ADD_CXXFLAGS" + , "ADD_LDFLAGS" , "AR" , "ENV" + , "BUILD_POSITION_INDEPENDENT" , "DEBUG" ] , "implicit": {"defaults": ["defaults"]} @@ -384,6 +405,11 @@ ["List of compile flags set for this target and its consumers."] , "private-cflags": ["List of compile flags set for source files local to this target."] + , "ldflags": + [ "Additional linker flags for linking external libraries for this" + , "target and its consumers (not built by this tool, typically system" + , "libraries)." + ] , "private-ldflags": [ "Additional linker flags for linking external libraries (not built" , "by this tool, typically system libraries)." @@ -400,6 +426,26 @@ , "duplicate work will be carried out, even if the same proto library" , "is used at various places)." ] + , "private-proto": + [ "Any [\"proto\", \"library\"] this target depends upon privately." + , "The creation of C++ bindings for this proto library as well as of" + , "its dependencies will be taken care of (as anonymous targets, so no" + , "duplicate work will be carried out, even if the same proto library" + , "is used at various places)." + ] + , "shared": + [ "If non-empty, produce a shared instead of a static library. Setting" + , "this option is mutually exclusive to the \"object_only\" option." + ] + , "object_only": + [ "If non-empty, produce an object library, resulting in object files" + , "added to the linker line of all depending targets. Setting this option" + , "is mutually exclusive to the \"shared\" option." + ] + , "soversion": + [ "The SOVERSION for shared libraries. Individual version components are" + , "joined with \".\"." + ] , "pkg-name": [ "Name to use for pkg-config files. If this field is empty, the field" , "\"name\" is used instead." @@ -427,6 +473,12 @@ , "adapting the default target [\"CC\", \"defaults\"] is the better" , "choice." ] + , "LDFLAGS": + [ "The linker flags to be used instead of the default ones." + , "For libraries that should be built in a non-standard way; usually" + , "adapting the default target [\"CC\", \"defaults\"] is the better" + , "choice." + ] , "ADD_CFLAGS": [ "The flags to add to the default ones for CC." , "For libraries that should be built in a non-standard way; usually" @@ -439,11 +491,18 @@ , "adapting the default target [\"CC\", \"defaults\"] is the better" , "choice." ] + , "ADD_LDFLAGS": + [ "The linker flags to add to the default ones." + , "For libraries that should be built in a non-standard way; usually" + , "adapting the default target [\"CC\", \"defaults\"] is the better" + , "choice." + ] , "AR": [ "The archive tool to used for creating the library" , "If None, the respective value from [\"CC\", \"defaults\"] will be taken." ] , "ENV": ["The environment for any action generated."] + , "BUILD_POSITION_INDEPENDENT": ["Build with -fPIC."] , "DEBUG": ["Compute the debug-stage, needed for local debugging."] } , "artifacts_doc": @@ -474,9 +533,30 @@ , "service library": ["./", "proto", "service library"] } } + , "private-proto-deps": + { "target": "private-proto" + , "provider": "proto" + , "rule_map": + { "library": ["./", "proto", "library"] + , "service library": ["./", "proto", "service library"] + } + } } , "imports": - {"artifacts": ["./", "..", "field_artifacts"], "result": "lib result"} + { "artifacts": ["./", "..", "field_artifacts"] + , "static result": "lib result" + , "shared result": "shared result" + , "object result": "object result" + , "fPIC transition": ["transitions", "with fPIC"] + } + , "config_transitions": + { "deps": [{"type": "CALL_EXPRESSION", "name": "fPIC transition"}] + , "private-deps": [{"type": "CALL_EXPRESSION", "name": "fPIC transition"}] + , "proto-deps": [{"type": "CALL_EXPRESSION", "name": "fPIC transition"}] + , "private-proto-deps": + [{"type": "CALL_EXPRESSION", "name": "fPIC transition"}] + , "defaults": [{"type": "CALL_EXPRESSION", "name": "fPIC transition"}] + } , "expression": { "type": "let*" , "bindings": @@ -544,7 +624,9 @@ } } ] + , ["ldflags", {"type": "FIELD", "name": "ldflags"}] , ["private-ldflags", {"type": "FIELD", "name": "private-ldflags"}] + , ["soversion", {"type": "FIELD", "name": "soversion"}] , [ "pkg-name" , { "type": "if" , "cond": {"type": "FIELD", "name": "pkg-name"} @@ -553,12 +635,44 @@ , "else": {"type": "var", "name": "name"} } ] + , [ "defaults-transition" + , {"type": "CALL_EXPRESSION", "name": "fPIC transition"} + ] + , [ "deps-transition" + , {"type": "CALL_EXPRESSION", "name": "fPIC transition"} + ] , ["public-fieldnames", ["deps", "proto-deps", "defaults"]] , [ "private-fieldnames" - , ["deps", "private-deps", "proto-deps", "defaults"] + , [ "deps" + , "private-deps" + , "proto-deps" + , "private-proto-deps" + , "defaults" + ] ] ] - , "body": {"type": "CALL_EXPRESSION", "name": "result"} + , "body": + { "type": "cond" + , "cond": + [ [ { "type": "and" + , "$1": + [ {"type": "FIELD", "name": "shared"} + , {"type": "FIELD", "name": "object_only"} + ] + } + , { "type": "fail" + , "msg": "Fields \"shared\" and \"object_only\" are mutually exclusive." + } + ] + , [ {"type": "FIELD", "name": "shared"} + , {"type": "CALL_EXPRESSION", "name": "shared result"} + ] + , [ {"type": "FIELD", "name": "object_only"} + , {"type": "CALL_EXPRESSION", "name": "object result"} + ] + ] + , "default": {"type": "CALL_EXPRESSION", "name": "static result"} + } } } , "binary": @@ -577,9 +691,12 @@ , "CXX" , "CFLAGS" , "CXXFLAGS" + , "LDFLAGS" , "ADD_CFLAGS" , "ADD_CXXFLAGS" + , "ADD_LDFLAGS" , "ENV" + , "BUILD_POSITION_INDEPENDENT" , "DEBUG" ] , "implicit": {"defaults": ["defaults"]} @@ -629,6 +746,10 @@ [ "The flags for CXX to be used instead of the default ones" , "taken from the [\"CC\", \"defaults\"] target" ] + , "LDFLAGS": + [ "The linker flags do be used instead of the default ones" + , "taken from the [\"CC\", \"defaults\"] target" + ] , "ADD_CFLAGS": [ "The flags to add to the default ones for CC" , "taken from the [\"CC\", \"defaults\"] target" @@ -637,7 +758,12 @@ [ "The flags to add to the default ones for CXX" , "taken from the [\"CC\", \"defaults\"] target" ] + , "ADD_LDFLAGS": + [ "The linker flags to add to the default ones" + , "taken from the [\"CC\", \"defaults\"] target" + ] , "ENV": ["The environment for any action generated."] + , "BUILD_POSITION_INDEPENDENT": ["Build with -fPIC."] , "DEBUG": ["Compute the debug-stage, needed for local debugging."] } , "artifacts_doc": ["The final binary, staged to the given directory"] |