This change adds BUILD files to //benchmarks that allow
users to consume the .proto files in that directory
to run benchmarks (e.g. for custom generators).
This commit removes an unused reference and registers globals with the
GC so that they will never die. Ruby is getting a compacting GC, and it
means that these references can move. Registering them with
`rb_gc_register_mark_object` will ensure the constants don't move and
will not be collected.
Add a --fatal_warnings flag that requests that protoc exit with a
failing status code if any warnings are generated during compilation.
Partially address #3980.
This change refactors util::Status to have a similar shape as the
recently open-sourced absl::Status. This will allow Protobuf to
eventually use absl::Status and reduce the codesize.
Note that there is more work required before absl::Status can be used.
This is useful for Conan recipes that build Protobuf, in which
whatever we want to enable has to be enabled in the initial command line.
Without this, the people maintaining the recipe have to patch the CMake
setup of Protobuf before building the binaries.
Closes#5541
This is useful for Conan recipes that build Protobuf, in which
whatever we want to enable has to be enabled in the initial command line.
Without this, the people maintaining the recipe have to patch the CMake
setup of Protobuf before building the binaries.
Closes#5541
This fixes the following build error:
In file included from no_warning_test.cc:7:
../../src/google/protobuf/parse_context.h: In instantiation of 'const char* google::protobuf::internal::EpsCopyInputStream::AppendUntilEnd(const char*, const A&) [with A = google::protobuf::internal::EpsCopyInputStream::AppendString(const char*, std::string*)::<lambda(const char*, ptrdiff_t)>]':
../../src/google/protobuf/parse_context.h:366:70: required from here
../../src/google/protobuf/stubs/logging.h:161:48: error: comparison of unsigned expression in '>= 0' is always true [-Werror=type-limits]
161 | #define GOOGLE_CHECK_GE(A, B) GOOGLE_CHECK((A) >= (B))
| ^
../../src/google/protobuf/stubs/logging.h:151:5: note: in definition of macro 'GOOGLE_LOG_IF'
151 | !(CONDITION) ? (void)0 : GOOGLE_LOG(LEVEL)
| ^~~~~~~~~
../../src/google/protobuf/stubs/logging.h:161:31: note: in expansion of macro 'GOOGLE_CHECK'
161 | #define GOOGLE_CHECK_GE(A, B) GOOGLE_CHECK((A) >= (B))
| ^~~~~~~~~~~~
../../src/google/protobuf/stubs/logging.h:201:26: note: in expansion of macro 'GOOGLE_CHECK_GE'
201 | #define GOOGLE_DCHECK_GE GOOGLE_CHECK_GE
| ^~~~~~~~~~~~~~~
../../src/google/protobuf/parse_context.h:351:7: note: in expansion of macro 'GOOGLE_DCHECK_GE'
351 | GOOGLE_DCHECK_GE(chunk_size, static_cast<size_t>(0));
| ^~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors