Allow optional building in of objc prefix validation. (#28388)

reviewable/pr28467/r1
Thomas Van Lenten 3 years ago committed by GitHub
parent 51a4e9336c
commit 0045e27bf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      src/compiler/objective_c_plugin.cc

@ -29,6 +29,9 @@
using ::google::protobuf::compiler::objectivec::
IsProtobufLibraryBundledProtoFile;
using ::google::protobuf::compiler::objectivec::ProtobufLibraryFrameworkName;
#ifdef SUPPORT_OBJC_PREFIX_VALIDATION
using ::google::protobuf::compiler::objectivec::ValidateObjCClassPrefixes;
#endif
using ::grpc_objective_c_generator::FrameworkImport;
using ::grpc_objective_c_generator::LocalImport;
using ::grpc_objective_c_generator::PreprocIfElse;
@ -90,6 +93,13 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
return true;
}
#ifdef SUPPORT_OBJC_PREFIX_VALIDATION
// Default options will use env variables for controls.
if (!ValidateObjCClassPrefixes({file}, {}, error)) {
return false;
}
#endif
bool grpc_local_import = false;
::std::string framework;
::std::string pb_runtime_import_prefix;

Loading…
Cancel
Save