Skip to content

Commit f16f882

Browse files
committed
Add semantic and protoc_extra_outs for deps.pb.h
Add semantic for deps.pb.h commit_hash:fb9944288736e5ca8162baf88ca903bd896de7b0
1 parent 2972a2c commit f16f882

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

build/conf/proto.conf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ CPP_PROTO_SUFFIXES=.pb.h .pb.cc
4545
CPP_PROTO_PLUGINS=
4646
CPP_PROTO_NO_DBGINFO=no
4747

48+
PROTOC_EXTRA_OUTS_SEM=
49+
4850
# tag:proto tag:cpp-specific
4951
CPP_EV_OPTS=--plugin=protoc-gen-event2cpp=${tool:"tools/event2cpp"} --event2cpp_out=$ARCADIA_BUILD_ROOT -I=$ARCADIA_ROOT/library/cpp/eventlog
5052
CPP_EV_OUTS=
@@ -208,8 +210,9 @@ macro WITH_KOTLIN_GRPC() {
208210

209211
# tag:proto tag:cpp-specific
210212
macro _ADD_CPP_PROTO_OUT(Suf) {
211-
.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)
213+
.SEM=append_target_property PROTOC_EXTRA_OUTS $Suf ${output;hide;suf=.o:Suf} $_ADD_SEM_PROP_IF_NON_EMPTY(PROTO_NAMESPACE $PROTO_NAMESPACE)
212214
SET_APPEND(CPP_PROTO_OUTS \${output;norel;nopath;noext;suf=$Suf:File})
215+
SET_APPEND(PROTOC_EXTRA_OUTS_SEM && protoc_extra_outs $Suf)
213216

214217
# XXX fix variable expansion in plugins
215218
SET(CPP_PROTO_SUFFIXES $CPP_PROTO_SUFFIXES $Suf)
@@ -387,6 +390,7 @@ macro YT_ORM_PROTO_YSON(OUT_OPTS[], Files...) {
387390
_SEM_CPP_PROTO_CMD=target_proto_messages PRIVATE ${input:File} \
388391
&& target_options-privates-ITEM && target_options-privates-option target_proto_messages && target_options-privates-args ${input:File} \
389392
$CPP_PROTO_OUTS_SEM ${output;hide;suf=${OBJ_SUF}.pb.o:File} $DEFAULT_PROTOC_TOOLS \
393+
$PROTOC_EXTRA_OUTS_SEM \
390394
&& set_global_flags COMMON_PROTOC_FLAGS \
391395
&& platform_vars-COMMON_PROTOC_FLAGS "" \
392396
&& target_proto_outs --cpp_out=$ARCADIA_BUILD_ROOT/$PROTO_NAMESPACE $PROTOC_STYLEGUIDE_OUT \

build/export_generators/cmake/target_properties.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ set_property(TARGET {{ name }} PROPERTY {{ property.name }}
1515

1616
{%- if (current_target.protoc_extra_outs is defined) and (current_target.protoc_extra_outs|length) %}
1717
set_property(TARGET {{ name }} PROPERTY PROTOC_EXTRA_OUTS
18-
{%- for protoc_extra_out in current_target.protoc_extra_outs %}
18+
{%- for protoc_extra_out in current_target.protoc_extra_outs|unique %}
1919
{{ protoc_extra_out }}
2020
{%- endfor %}
2121
)

build/ymake.core.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,8 @@ module _BASE_UNIT: _BARE_UNIT {
631631
when ($PROTOC_TRANSITIVE_HEADERS == "no") {
632632
CPP_PROTO_PLUGINS=proto_h=true:${CPP_PROTO_PLUGINS}
633633
CPP_PROTO_OUTS+=${output;main;norel;nopath;noext:File.deps.pb.h}
634+
CPP_PROTO_OUTS_SEM+=${output;main;hide;norel;nopath;noext:File.deps.pb.h}
635+
PROTOC_EXTRA_OUTS_SEM=&& protoc_extra_outs .deps.pb.h
634636
}
635637
}
636638

0 commit comments

Comments
 (0)