summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordimdim11 <[email protected]>2024-10-02 05:49:50 +0300
committerdimdim11 <[email protected]>2024-10-02 05:59:11 +0300
commitf16f882b5f629a7b2be69e4209dd9913076c7168 (patch)
tree611f546f02c80cba46aca7b8af71f22bff8150ee
parent2972a2c2936e555e1cddf0c069c6da6406bd1d1c (diff)
Add semantic and protoc_extra_outs for deps.pb.h
Add semantic for deps.pb.h commit_hash:fb9944288736e5ca8162baf88ca903bd896de7b0
-rw-r--r--build/conf/proto.conf6
-rw-r--r--build/export_generators/cmake/target_properties.jinja2
-rw-r--r--build/ymake.core.conf2
3 files changed, 8 insertions, 2 deletions
diff --git a/build/conf/proto.conf b/build/conf/proto.conf
index 7fd77916e8b..b53adb1256a 100644
--- a/build/conf/proto.conf
+++ b/build/conf/proto.conf
@@ -45,6 +45,8 @@ CPP_PROTO_SUFFIXES=.pb.h .pb.cc
CPP_PROTO_PLUGINS=
CPP_PROTO_NO_DBGINFO=no
+PROTOC_EXTRA_OUTS_SEM=
+
# tag:proto tag:cpp-specific
CPP_EV_OPTS=--plugin=protoc-gen-event2cpp=${tool:"tools/event2cpp"} --event2cpp_out=$ARCADIA_BUILD_ROOT -I=$ARCADIA_ROOT/library/cpp/eventlog
CPP_EV_OUTS=
@@ -208,8 +210,9 @@ macro WITH_KOTLIN_GRPC() {
# tag:proto tag:cpp-specific
macro _ADD_CPP_PROTO_OUT(Suf) {
- .SEM=append_target_property PROTOC_EXTRA_OUTS $Suf && protoc_extra_outs $Suf ${output;hide;suf=.o:Suf} $_ADD_SEM_PROP_IF_NON_EMPTY(PROTO_NAMESPACE $PROTO_NAMESPACE)
+ .SEM=append_target_property PROTOC_EXTRA_OUTS $Suf ${output;hide;suf=.o:Suf} $_ADD_SEM_PROP_IF_NON_EMPTY(PROTO_NAMESPACE $PROTO_NAMESPACE)
SET_APPEND(CPP_PROTO_OUTS \${output;norel;nopath;noext;suf=$Suf:File})
+ SET_APPEND(PROTOC_EXTRA_OUTS_SEM && protoc_extra_outs $Suf)
# XXX fix variable expansion in plugins
SET(CPP_PROTO_SUFFIXES $CPP_PROTO_SUFFIXES $Suf)
@@ -387,6 +390,7 @@ macro YT_ORM_PROTO_YSON(OUT_OPTS[], Files...) {
_SEM_CPP_PROTO_CMD=target_proto_messages PRIVATE ${input:File} \
&& target_options-privates-ITEM && target_options-privates-option target_proto_messages && target_options-privates-args ${input:File} \
$CPP_PROTO_OUTS_SEM ${output;hide;suf=${OBJ_SUF}.pb.o:File} $DEFAULT_PROTOC_TOOLS \
+ $PROTOC_EXTRA_OUTS_SEM \
&& set_global_flags COMMON_PROTOC_FLAGS \
&& platform_vars-COMMON_PROTOC_FLAGS "" \
&& target_proto_outs --cpp_out=$ARCADIA_BUILD_ROOT/$PROTO_NAMESPACE $PROTOC_STYLEGUIDE_OUT \
diff --git a/build/export_generators/cmake/target_properties.jinja b/build/export_generators/cmake/target_properties.jinja
index ffcbdd89625..8eb72420593 100644
--- a/build/export_generators/cmake/target_properties.jinja
+++ b/build/export_generators/cmake/target_properties.jinja
@@ -15,7 +15,7 @@ set_property(TARGET {{ name }} PROPERTY {{ property.name }}
{%- if (current_target.protoc_extra_outs is defined) and (current_target.protoc_extra_outs|length) %}
set_property(TARGET {{ name }} PROPERTY PROTOC_EXTRA_OUTS
-{%- for protoc_extra_out in current_target.protoc_extra_outs %}
+{%- for protoc_extra_out in current_target.protoc_extra_outs|unique %}
{{ protoc_extra_out }}
{%- endfor %}
)
diff --git a/build/ymake.core.conf b/build/ymake.core.conf
index 84987a0ec07..73550a1a1d2 100644
--- a/build/ymake.core.conf
+++ b/build/ymake.core.conf
@@ -631,6 +631,8 @@ module _BASE_UNIT: _BARE_UNIT {
when ($PROTOC_TRANSITIVE_HEADERS == "no") {
CPP_PROTO_PLUGINS=proto_h=true:${CPP_PROTO_PLUGINS}
CPP_PROTO_OUTS+=${output;main;norel;nopath;noext:File.deps.pb.h}
+ CPP_PROTO_OUTS_SEM+=${output;main;hide;norel;nopath;noext:File.deps.pb.h}
+ PROTOC_EXTRA_OUTS_SEM=&& protoc_extra_outs .deps.pb.h
}
}