Vanilla protobuf support when building with --maps-mobile
@@ -216,7 +216,14 @@ when ($PERLC == "yes") {
XSUBPPFLAGS=
ARCH_TOOL=${tool:"tools/archiver"}
+
+PROTOC=
+when ($USE_VANILLA_PROTOC) {
+ PROTOC=${tool:"devtools/contrib/tools/protoc_std"}
+}
+otherwise {
PROTOC=${tool:"contrib/tools/protoc"}
+}
PROTOC_STYLEGUIDE_OUT=--cpp_styleguide_out=$ARCADIA_BUILD_ROOT/$PROTO_NAMESPACE
PROTOC_PLUGIN_STYLEGUIDE=--plugin=protoc-gen-cpp_styleguide=${tool:"contrib/tools/protoc/plugins/cpp_styleguide"}
FML_TOOL=${tool:"tools/relev_fml_codegen"}
@@ -457,6 +464,11 @@ macro _CPP_PROTO_CMD(File) {
.PEERDIR=contrib/libs/protobuf
}
+macro _CPP_VANILLA_PROTO_CMD(File) {
+ .CMD=$CPP_PROTO_CMDLINE $CPP_PROTO_OPTS $CPP_PROTO_OUTS ${kv;hide:"p PB"} ${kv;hide:"pc yellow"}
+ .PEERDIR=contrib/libs/protobuf_std
+}
+
macro _CPP_EVLOG_CMD(File) {
.CMD=$CPP_PROTO_CMDLINE $CPP_EV_OPTS $CPP_EV_OUTS ${kv;hide:"p EV"} ${kv;hide:"pc yellow"}
.PEERDIR=library/eventlog contrib/libs/protobuf
@@ -671,6 +683,17 @@ module _BASE_UNIT {
PROTO_SOURCE_INCLUDE=
PROTO_HEADER_INCLUDE=
}
+ elsewhen ($USE_VANILLA_PROTOC) {
+ PROTOC=${tool:"contrib/tools/protoc_std"}
+ PROTOC_STYLEGUIDE_OUT=
+ PROTOC_PLUGIN_STYLEGUIDE=
+ PROTO_PATH=$ARCADIA_ROOT/contrib/libs/protobuf_std
+ MACRO_ALIAS(PROTO_CMD _CPP_VANILLA_PROTO_CMD)
+ PROTO_SOURCE_INCLUDE=contrib/libs/protobuf_std/stubs/common.h contrib/libs/protobuf_std/generated_message_util.h contrib/libs/protobuf_std/repeated_field.h contrib/libs/protobuf_std/extension_set.h contrib/libs/protobuf_std/generated_message_reflection.h contrib/libs/protobuf_std/service.h contrib/libs/protobuf_std/messagext.h
+ PROTO_HEADER_INCLUDE=contrib/libs/protobuf_std/stubs/once.h contrib/libs/protobuf_std/io/coded_stream.h contrib/libs/protobuf_std/wire_format_lite_inl.h contrib/libs/protobuf_std/descriptor.h contrib/libs/protobuf_std/reflection_ops.h contrib/libs/protobuf_std/wire_format.h contrib/libs/protobuf_std/map_entry.h contrib/libs/protobuf_std/map_field_inl.h
+
+ CFLAGS+=-Wno-unused-parameter
+ }
elsewhen ($USE_EXTERNAL_PROTOC) {
PROTOC=$EXTERNAL_PROTOC_RESOURCE_GLOBAL/bin/protoc
PROTOC_STYLEGUIDE_OUT=
@@ -6023,6 +6046,10 @@ USE_EXTERNAL_PROTOC=
# mapsmobi build configuration
+when ($MAPSMOBI_BUILD_TARGET) {
+ USE_VANILLA_PROTOC=yes
+}
+
MAPSMOBI_IDL_TOOL=tools/idl/bin
MAPSMOBI_BUILD=
YANDEX_EXPORT=
@@ -6034,7 +6061,6 @@ when ($MAPSMOBI_BUILD) {
}
when ($MAPSMOBI_BUILD_TARGET) {
ALLOCATOR=FAKE
- USE_EXTERNAL_PROTOC=yes
SYSINCL+=build/sysincl/mapsmobi.yml
OPTIMIZE=-O2
