summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Reiche <oliver.reiche@huawei.com>2022-12-06 16:14:05 +0100
committerOliver Reiche <oliver.reiche@huawei.com>2022-12-16 17:19:47 +0100
commite97ac1a8de806e7bccd6a8be8436e95cf2bbb341 (patch)
tree42d061dd72b069a0e118621376fe1ee56c28f717
parentc4ff7d76b2ca73017d2d96923437de7a1d0aa71d (diff)
downloadrules-cc-e97ac1a8de806e7bccd6a8be8436e95cf2bbb341.tar.gz
rules: Implement private-proto for libraries
-rw-r--r--CC/RULES30
1 files changed, 28 insertions, 2 deletions
diff --git a/CC/RULES b/CC/RULES
index 4bfae16..992e4a3 100644
--- a/CC/RULES
+++ b/CC/RULES
@@ -123,7 +123,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"
@@ -203,6 +210,13 @@
, "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."]
, "soversion":
[ "The SOVERSION for shared libraries. Individual version components are"
@@ -287,6 +301,14 @@
, "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"]
@@ -298,6 +320,8 @@
{ "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"}]
}
, "expression":
{ "type": "let*"
@@ -373,7 +397,9 @@
, {"type": "CALL_EXPRESSION", "name": "fPIC transition"}
]
, ["public-fieldnames", ["deps", "proto-deps"]]
- , ["private-fieldnames", ["deps", "private-deps", "proto-deps"]]
+ , [ "private-fieldnames"
+ , ["deps", "private-deps", "proto-deps", "private-proto-deps"]
+ ]
]
, "body":
{ "type": "if"