Protoc Internal changes.

PiperOrigin-RevId: 605658497
pull/15646/head
Protobuf Team Bot 1 year ago committed by Copybara-Service
parent 5e55d11bcd
commit 833451eaf3
  1. 1
      src/google/protobuf/compiler/allowlists/allowlists.h
  2. 7
      src/google/protobuf/compiler/main.cc

@ -35,6 +35,7 @@ bool IsEarlyEditionsFile(absl::string_view file);
// Returns whether a file allows required fields.
bool IsRequiredFieldFile(absl::string_view file);
} // namespace compiler
} // namespace protobuf
} // namespace google

@ -18,6 +18,10 @@
#include "google/protobuf/compiler/ruby/ruby_generator.h"
#include "google/protobuf/compiler/rust/generator.h"
#ifdef DISABLE_PROTOC_CONFIG
#include "google/protobuf/compiler/allowlists/allowlists.h"
#endif // DISABLE_PROTOC_CONFIG
// Must be included last.
#include "google/protobuf/port_def.inc"
@ -98,6 +102,9 @@ int ProtobufMain(int argc, char* argv[]) {
rust::RustGenerator rust_generator;
cli.RegisterGenerator("--rust_out", "--rust_opt", &rust_generator,
"Generate Rust sources.");
#ifdef DISABLE_PROTOC_CONFIG
internal::SetDisableAllowlistInternalOnly(true);
#endif // DISABLE_PROTOC_CONFIG
return cli.Run(argc, argv);
}

Loading…
Cancel
Save