diff options
author | svidyuk <svidyuk@yandex-team.com> | 2024-04-05 07:07:56 +0300 |
---|---|---|
committer | svidyuk <svidyuk@yandex-team.com> | 2024-04-05 07:17:50 +0300 |
commit | 6484550aa9842e870619262b6ff32e2e35820210 (patch) | |
tree | 014cf2c50eb53eb5365a51ee0a0b61cc02ed9afe /build/conf/proto.conf | |
parent | 72c0e2fa8054597e8e76a0c1dd60e5539a4278fe (diff) | |
download | ydb-6484550aa9842e870619262b6ff32e2e35820210.tar.gz |
Do not drop adincls in ya make opensource build because of cmake export replacements
a118aa391374ee757d795d5237e28fb8cf1e74fe
Diffstat (limited to 'build/conf/proto.conf')
-rw-r--r-- | build/conf/proto.conf | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/build/conf/proto.conf b/build/conf/proto.conf index 486b32f106..1028a8c79a 100644 --- a/build/conf/proto.conf +++ b/build/conf/proto.conf @@ -5,9 +5,18 @@ NEW_JAVA_PROTOC=yes when ($NEW_JAVA_PROTOC == "yes") { JAVA_PROTOC=${tool:"build/platform/java/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"} -PROTOBUF_PATH=${ARCADIA_ROOT}/contrib/libs/protobuf/src +when ($OPENSOURCE_REPLACE_PROTOBUF) { + PROTOC_STYLEGUIDE_OUT= + PROTOC_PLUGIN_STYLEGUIDE= + PROTOBUF_PATH="${protobuf_INCLUDE_DIRS}" + DEFAULT_PROTOC_TOOLS= +} +otherwise { + 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"} + PROTOBUF_PATH=${ARCADIA_ROOT}/contrib/libs/protobuf/src + DEFAULT_PROTOC_TOOLS=${hide;tool:"contrib/tools/protoc/bin"} ${hide;tool:"contrib/tools/protoc/plugins/cpp_styleguide"} +} USE_VANILLA_PROTOC=no PROTOC_TRANSITIVE_HEADERS=yes _PROTOC_FLAGS= @@ -352,7 +361,7 @@ GO_PROTO_CMDLINE=${cwd;rootdir;input:File} $YMAKE_PYTHON3 ${input:"build/scripts macro _GO_PROTO_CMD_IMPL(File, OPTS...) { .CMD=$GO_PROTO_CMDLINE $OPTS ${kv;hide:"p PB"} ${kv;hide:"pc yellow"} .PEERDIR=${GO_PROTOBUF_IMPORTS} ${GO_PROTOBUF_WELLKNOWN_TYPES} - .ADDINCL=FOR proto contrib/libs/protobuf/src + .ADDINCL=FOR proto ${PROTOBUF_PATH} } # tag:go-specific tag:proto @@ -366,12 +375,12 @@ macro _GO_PROTO_CMD(File) { ### Generate .yson.go from .proto using yt/yt/orm/go/codegen/yson/internal/proto-yson-gen/cmd/proto-yson-gen macro YT_ORM_PROTO_YSON(OUT_OPTS[], Files...) { .CMD=${cwd:BINDIR} $PROTOC --plugin=protoc-gen-custom=${tool:"yt/yt/orm/go/codegen/yson/internal/proto-yson-gen/cmd/proto-yson-gen"} -I=${ARCADIA_ROOT}/${PROTO_NAMESPACE} ${pre=-I=:_PROTO__INCLUDE} -I=${ARCADIA_ROOT} --custom_out="$OUT_OPTS paths=base_name:." --custom_opt="goroot=${GO_TOOLS_ROOT}" $_PROTOC_FLAGS ${input:Files} ${output;hide;noauto;nopath;noext;suf=.yson.go:Files} ${hide:PROTO_FAKEID} - .ADDINCL=FOR proto ${ARCADIA_ROOT}/${MODDIR} FOR proto ${ARCADIA_ROOT}/${GO_TEST_IMPORT_PATH} FOR proto yt ${ARCADIA_BUILD_ROOT}/yt FOR proto contrib/libs/protobuf/src + .ADDINCL=FOR proto ${ARCADIA_ROOT}/${MODDIR} FOR proto ${ARCADIA_ROOT}/${GO_TEST_IMPORT_PATH} FOR proto yt ${ARCADIA_BUILD_ROOT}/yt FOR proto ${PROTOBUF_PATH} .PEERDIR=$GOSTD/strings $GOSTD/fmt $GOSTD/errors $GOSTD/encoding/json library/go/core/xerrors yt/go/yson yt/go/yterrors yt/yt/orm/go/codegen/yson/ytypes contrib/libs/protobuf } -_SEM_CPP_PROTO_CMD=target_proto_messages PRIVATE ${input:File} $CPP_PROTO_OUTS_SEM ${output;hide;suf=${OBJ_SUF}.pb.o:File} ${hide;tool:"contrib/tools/protoc/bin"} ${hide;tool:"contrib/tools/protoc/plugins/cpp_styleguide"} \ +_SEM_CPP_PROTO_CMD=target_proto_messages PRIVATE ${input:File} $CPP_PROTO_OUTS_SEM ${output;hide;suf=${OBJ_SUF}.pb.o:File} $DEFAULT_PROTOC_TOOLS \ && set_global_flags COMMON_PROTOC_FLAGS \ && target_proto_outs --cpp_out=$ARCADIA_BUILD_ROOT/$PROTO_NAMESPACE $PROTOC_STYLEGUIDE_OUT \ && target_proto_addincls ./$PROTO_NAMESPACE $ARCADIA_ROOT/$PROTO_NAMESPACE ${_PROTO__INCLUDE} $ARCADIA_BUILD_ROOT $PROTOBUF_PATH @@ -389,7 +398,7 @@ macro _CPP_VANILLA_PROTO_CMD(File) { .PEERDIR=contrib/libs/protobuf_std } -_SEM_CPP_EV_CMD=target_ev_messages PRIVATE ${input:File} $CPP_EV_OUTS_SEM ${output;hide;suf=${OBJ_SUF}.pb.o:File} ${hide;tool:"tools/event2cpp/bin"} ${hide;tool:"contrib/tools/protoc/bin"} ${hide;tool:"contrib/tools/protoc/plugins/cpp_styleguide"} \ +_SEM_CPP_EV_CMD=target_ev_messages PRIVATE ${input:File} $CPP_EV_OUTS_SEM ${output;hide;suf=${OBJ_SUF}.pb.o:File} ${hide;tool:"tools/event2cpp/bin"} $DEFAULT_PROTOC_TOOLS \ && set_global_flags COMMON_PROTOC_FLAGS \ && target_proto_outs --cpp_out=$ARCADIA_BUILD_ROOT/$PROTO_NAMESPACE $PROTOC_STYLEGUIDE_OUT --event2cpp_out=$ARCADIA_BUILD_ROOT/$PROTO_NAMESPACE \ && target_proto_addincls ./$PROTO_NAMESPACE $ARCADIA_ROOT/$PROTO_NAMESPACE ${_PROTO__INCLUDE} $ARCADIA_BUILD_ROOT $PROTOBUF_PATH $ARCADIA_ROOT/library/cpp/eventlog |