Add option for non-intrusive protobuf/eventlog compilation
@@ -222,6 +222,12 @@ macro CPP_PROTO_CMD(File) {
.PEERDIR=contrib/libs/protobuf
}
+macro CPP_PROTO_EVLOG_CMD(File) {
+ .CMD=${cwd:ARCADIA_ROOT} $PROTOC --cpp_out=$ARCADIA_BUILD_ROOT --plugin=protoc-gen-cpp_styleguide=$PROTOC_STYLEGUIDE --cpp_styleguide_out=$ARCADIA_BUILD_ROOT --plugin=protoc-gen-event2cpp=${tool:"tools/event2cpp"} --event2cpp_out=$ARCADIA_BUILD_ROOT -I. -I$ARCADIA_ROOT -I$PROTO_PATH -I$ARCADIA_ROOT/library/eventlog ${input;rootrel:SRC} ${output;noext;chksum;hide:SRC.pb.cc} ${output;noext;chksum;hide:SRC.pb.h} ${kv;hide:"p EV"} ${kv;hide:"pc yellow"}
+ .PEERDIR=library/eventlog contrib/libs/protobuf
+ .INCLUDE_CPP=yes
+}
+
macro PY_PROTO_CMD(File) {
.CMD=${cwd;rootdir;input:File} $PROTOC -I=./$PROTO_NAMESPACE -I=$ARCADIA_ROOT/$PROTO_NAMESPACE -I=$ARCADIA_BUILD_ROOT -I=$PROTO_PATH --python_out=$ARCADIA_BUILD_ROOT/$PROTO_NAMESPACE ${input;rootrel:File} ${output;hide;norel;noext;suf=_pb2.py:File} ${kv;hide:"p PT"} ${kv;hide:"pc yellow"} $GRPC_PY_ARGS
}
@@ -324,6 +330,7 @@ module BASE_UNIT {
}
DEFAULT(PY_PROTOS_FOR no)
+ DEFAULT(BUILD_PROTO_AS_EVLOG no)
when ($PY_PROTOS_FOR == "yes") {
MACRO_ALIAS(EVLOG_CMD PY_EVLOG_CMD)
@@ -331,8 +338,13 @@ module BASE_UNIT {
}
otherwise {
MACRO_ALIAS(EVLOG_CMD CPP_EVLOG_CMD)
+ when ($BUILD_PROTO_AS_EVLOG == "yes") {
+ MACRO_ALIAS(PROTO_CMD CPP_PROTO_EVLOG_CMD)
+ }
+ otherwise {
MACRO_ALIAS(PROTO_CMD CPP_PROTO_CMD)
}
+ }
SANITIZER_DEFINED=no
