diff options
Diffstat (limited to 'CC/proto')
-rw-r--r-- | CC/proto/EXPRESSIONS | 31 | ||||
-rw-r--r-- | CC/proto/RULES | 57 |
2 files changed, 48 insertions, 40 deletions
diff --git a/CC/proto/EXPRESSIONS b/CC/proto/EXPRESSIONS index b2b3ea0..1ab17a5 100644 --- a/CC/proto/EXPRESSIONS +++ b/CC/proto/EXPRESSIONS @@ -8,13 +8,17 @@ } , "protoc-compile": { "vars": - [ "transition" - , "service support" - , "CXX" + [ "CXX" , "CXXFLAGS" , "ADD_CXXFLAGS" - , "ENV" , "AR" + , "ENV" + , "name" + , "stage" + , "service support" + , "deps-transition" + , "public-fieldnames" + , "private-fieldnames" ] , "imports": { "stage": ["", "stage_singleton_field"] @@ -26,9 +30,14 @@ , "expression": { "type": "let*" , "bindings": - [ [ "protoc" + [ ["pure C", false] + , [ "protoc" , { "type": "let*" - , "bindings": [["fieldname", "protoc"], ["location", "protoc"]] + , "bindings": + [ ["fieldname", "protoc"] + , ["transition", {"type": "var", "name": "deps-transition"}] + , ["location", "protoc"] + ] , "body": {"type": "CALL_EXPRESSION", "name": "stage"} } ] @@ -39,6 +48,7 @@ { "type": "let*" , "bindings": [ ["fieldname", "grpc_cpp_plugin"] + , ["transition", {"type": "var", "name": "deps-transition"}] , ["location", "grpc_cpp_plugin"] ] , "body": {"type": "CALL_EXPRESSION", "name": "stage"} @@ -52,8 +62,7 @@ , "subdir": "work" , "$1": { "type": "let*" - , "bindings": - [["fieldname", "well_known_protos"], ["transition", null]] + , "bindings": [["fieldname", "well_known_protos"]] , "body": {"type": "CALL_EXPRESSION", "name": "artifacts"} } } @@ -63,7 +72,7 @@ , "msg": "Sources may not conflict" , "$1": { "type": "let*" - , "bindings": [["fieldname", "srcs"], ["transition", null]] + , "bindings": [["fieldname", "srcs"]] , "body": {"type": "CALL_EXPRESSION", "name": "artifacts_list"} } } @@ -289,7 +298,9 @@ , "value": {"type": "var", "name": "all proto srcs"} } ] - , ["local cflags", ["-Wno-sign-conversion", "-Wno-unused-function"]] + , ["cflags", []] + , ["private-cflags", ["-Wno-sign-conversion", "-Wno-unused-function"]] + , ["private-ldflags", []] ] , "body": {"type": "CALL_EXPRESSION", "name": "result"} } diff --git a/CC/proto/RULES b/CC/proto/RULES index d53ab35..d1cfc4e 100644 --- a/CC/proto/RULES +++ b/CC/proto/RULES @@ -8,25 +8,12 @@ , "string_fields": ["name", "stage"] , "target_fields": ["srcs", "deps"] , "config_vars": - [ "OS" - , "ARCH" - , "HOST_ARCH" - , "CXX" - , "CC" - , "CXXFLAGS" - , "CFLAGS" - , "ADD_CXXFLAGS" - , "ADD_CFLAGS" - , "ENV" - , "AR" - ] + ["OS", "ARCH", "HOST_ARCH", "CXX", "CFLAGS", "ADD_CFLAGS", "AR", "ENV"] , "implicit": { "protoc": [["@", "protoc", "", "protoc"]] , "defaults": [["./", "..", "defaults"]] , "proto-deps": [["@", "protoc", "", "C++ runtime"]] , "well_known_protos": [["@", "protoc", "", "well_known_protos"]] - , "pure C": [] - , "private-deps": [] } , "imports": { "protoc-compile": "protoc-compile" @@ -37,7 +24,19 @@ , "expression": { "type": "let*" , "bindings": - [["transition", {"type": "CALL_EXPRESSION", "name": "host transition"}]] + [ ["name", {"type": "join", "$1": {"type": "FIELD", "name": "name"}}] + , [ "stage" + , { "type": "join" + , "separator": "/" + , "$1": {"type": "FIELD", "name": "stage"} + } + ] + , [ "deps-transition" + , {"type": "CALL_EXPRESSION", "name": "host transition"} + ] + , ["public-fieldnames", ["deps", "proto-deps"]] + , ["private-fieldnames", ["deps", "proto-deps"]] + ] , "body": {"type": "CALL_EXPRESSION", "name": "protoc-compile"} } } @@ -51,18 +50,7 @@ , "string_fields": ["name", "stage"] , "target_fields": ["srcs", "deps"] , "config_vars": - [ "OS" - , "ARCH" - , "HOST_ARCH" - , "CXX" - , "CC" - , "CXXFLAGS" - , "CFLAGS" - , "ADD_CXXFLAGS" - , "ADD_CFLAGS" - , "ENV" - , "AR" - ] + ["OS", "ARCH", "HOST_ARCH", "CXX", "CXXFLAGS", "ADD_CXXFLAGS", "AR", "ENV"] , "implicit": { "protoc": [["@", "protoc", "", "protoc"]] , "grpc_cpp_plugin": [["@", "grpc", "src/compiler", "grpc_cpp_plugin"]] @@ -72,8 +60,6 @@ , ["@", "protoc", "", "C++ runtime"] ] , "well_known_protos": [["@", "protoc", "", "well_known_protos"]] - , "pure C": [] - , "private-deps": [] } , "imports": { "protoc-compile": "protoc-compile" @@ -88,7 +74,18 @@ { "type": "let*" , "bindings": [ ["service support", true] - , ["transition", {"type": "CALL_EXPRESSION", "name": "host transition"}] + , ["name", {"type": "join", "$1": {"type": "FIELD", "name": "name"}}] + , [ "stage" + , { "type": "join" + , "separator": "/" + , "$1": {"type": "FIELD", "name": "stage"} + } + ] + , [ "deps-transition" + , {"type": "CALL_EXPRESSION", "name": "host transition"} + ] + , ["public-fieldnames", ["deps", "proto-deps"]] + , ["private-fieldnames", ["deps", "proto-deps"]] ] , "body": {"type": "CALL_EXPRESSION", "name": "protoc-compile"} } |