Changes Announced on January 16, 2026
Prebuilt proto compiler (protoc) for Bazel
In an effort to speed up builds, protobuf 33.4 offers an option to skip re-compiling Protobuf tools and runtimes and use a pre-built protoc binary, available to Bazel 7 and later. Using a pre-built protoc also avoids build failures from incompatible or non-hermetic C++ compilation toolchain installed on your machine.
To use the prebuilt protoc, upgrade to protobuf version 33.4 or later, and set
the --incompatible_enable_proto_toolchain_resolution and
--@protobuf//bazel/flags:prefer_prebuilt_protoc flags. The first flag is set
by default in Bazel 9 onwards.
In the breaking v34 release, protobuf will change the default of
--@protobuf//bazel/flags:prefer_prebuilt_protoc to true.
Reasons not to use the prebuilt compiler
There are some use cases in which using the prebuilt protoc is not recommended:
- Your corporate security policy requires all dependencies be built from source.
- You need to build for the exec platform with a specific compiler or specific compiler flags.
- You are making changes to protoc, itself, and want to ensure that those changes are tested.
Troubleshooting
For information on troubleshooting the prebuilt protoc compiler configuration, see Bazel: Resolving Issues with Prebuilt Protoc
For more information on other changes in Bazel 9 that affect Protocol Buffers, see https://bazel.build/about/roadmap.