diff options
| author | innokentii <[email protected]> | 2024-02-16 20:10:55 +0300 |
|---|---|---|
| committer | innokentii <[email protected]> | 2024-02-16 20:25:26 +0300 |
| commit | 3ce9cf4c333518fc721cc89f404c835ba63411d8 (patch) | |
| tree | 4e48459e2137197712dea748393473287e70ec26 /contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_file.cc | |
| parent | ce3d6ca3ea728ae0ddc30aba2e1ee88a6f79985a (diff) | |
Make PROTOC_TRANSITIVE_HEADERS=no compatible with GRPC()
add new deps to protobuf out
done with grpc
done with pb
fix
add patch to make intransitive pb compatible with grpc
60ab6319b92d29a98a74971c6906cd8eea1aab1e
Diffstat (limited to 'contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_file.cc')
| -rw-r--r-- | contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_file.cc | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_file.cc b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_file.cc index 681e16a9476..2a98ad0b02c 100644 --- a/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_file.cc +++ b/contrib/libs/protoc/src/google/protobuf/compiler/cpp/cpp_file.cc @@ -317,6 +317,17 @@ void FileGenerator::GeneratePBHeader(io::Printer* printer, GenerateBottomHeaderGuard(printer, true); } +void FileGenerator::GeneratePBDeps(io::Printer* printer, + const TProtoStringType& info_path) { + Formatter format(printer, variables_); + + GenerateTopHeaderGuard(printer, true, true); + + GenerateDependencyIncludes(printer); + + GenerateBottomHeaderGuard(printer, true, true); +} + void FileGenerator::DoIncludeFile(const TProtoStringType& google3_name, bool do_export, io::Printer* printer) { Formatter format(printer, variables_); @@ -1142,7 +1153,7 @@ void FileGenerator::GenerateForwardDeclarations(io::Printer* printer) { format("PROTOBUF_NAMESPACE_CLOSE\n"); } -void FileGenerator::GenerateTopHeaderGuard(io::Printer* printer, bool pb_h) { +void FileGenerator::GenerateTopHeaderGuard(io::Printer* printer, bool pb_h, bool deps) { Formatter format(printer, variables_); // Generate top of header. format( @@ -1154,7 +1165,7 @@ void FileGenerator::GenerateTopHeaderGuard(io::Printer* printer, bool pb_h) { "\n" "#include <limits>\n" "#include <string>\n", - IncludeGuard(file_, pb_h, options_)); + IncludeGuard(file_, pb_h, deps, options_)); if (!options_.opensource_runtime && !enum_generators_.empty()) { // Add header to provide std::is_integral for safe Enum_Name() function. format("#include <type_traits>\n"); @@ -1162,10 +1173,10 @@ void FileGenerator::GenerateTopHeaderGuard(io::Printer* printer, bool pb_h) { format("\n"); } -void FileGenerator::GenerateBottomHeaderGuard(io::Printer* printer, bool pb_h) { +void FileGenerator::GenerateBottomHeaderGuard(io::Printer* printer, bool pb_h, bool deps) { Formatter format(printer, variables_); format("#endif // $GOOGLE_PROTOBUF$_INCLUDED_$1$\n", - IncludeGuard(file_, pb_h, options_)); + IncludeGuard(file_, pb_h, deps, options_)); } void FileGenerator::GenerateLibraryIncludes(io::Printer* printer) { |
