@@ -8,16 +8,19 @@ type = "docs"
88
99## Prebuilt proto compiler (protoc) for Bazel
1010
11- In an effort to speed up builds, Bazel 9 provides an option to skip re-compiling
12- Protobuf tools and runtimes and use a pre-built protoc binary. Using a pre-built
13- protoc also avoids build failures from incompatible or non-hermetic C++
14- compilation toolchain installed on your machine.
15-
16- To use the prebuilt protoc, you must be using Bazel 9 or later, which itself
17- requires protobuf version 33.4 or later. Set the
18- ` --@protobuf//bazel/toolchains:prefer_prebuilt_protoc ` flag to use the prebuilt
19- protoc. The default will be changed to use the prebuilt protoc with the breaking
20- v34 release.
11+ In an effort to speed up builds, protobuf 33.4 offers an option to skip
12+ re-compiling Protobuf tools and runtimes and use a pre-built protoc binary,
13+ available to Bazel 7 and later. Using a pre-built protoc also avoids build
14+ failures from incompatible or non-hermetic C++ compilation toolchain installed
15+ on your machine.
16+
17+ To use the prebuilt protoc, upgrade to protobuf version 33.4 or later, and set
18+ the ` --incompatible_enable_proto_toolchain_resolution ` and
19+ ` --@protobuf//bazel/toolchains:prefer_prebuilt_protoc ` flags. The first flag is
20+ set by default in Bazel 9 onwards.
21+
22+ In the breaking v34 release, protobuf will change the default of
23+ ` --@protobuf//bazel/toolchains:prefer_prebuilt_protoc ` to true.
2124
2225### Reasons not to use the prebuilt compiler
2326
0 commit comments