Skip to content

Commit bd85c3f

Browse files
Add news about prebuilt protoc option with Bazel 9.
PiperOrigin-RevId: 857301460
1 parent ed4b5c1 commit bd85c3f

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

content/news/2026-01-16.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
+++
2+
title = "Changes Announced on January 16, 2026"
3+
linkTitle = "January 16, 2026"
4+
toc_hide = "true"
5+
description = "Changes announced for Protocol Buffers on January 16, 2026."
6+
type = "docs"
7+
+++
8+
9+
## Prebuilt proto compiler (protoc) for Bazel
10+
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.
21+
22+
### Reasons not to use the prebuilt compiler
23+
24+
There are some use cases in which using the prebuilt protoc is not recommended:
25+
26+
* Your corporate security policy requires all dependencies be built from
27+
source.
28+
* You need to build for the exec platform with a specific compiler or specific
29+
compiler flags.
30+
* You are making changes to protoc, itself, and want to ensure that those
31+
changes are tested.
32+
33+
For more information on other changes in Bazel 9 that affect Protocol Buffers,
34+
see https://bazel.build/about/roadmap.

content/news/_index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ New news topics will also be published to the
2020
The following news topics provide information in the reverse order in which it
2121
was released.
2222

23+
* [January 16, 2026](/news/2026-01-16) - Prebuilt proto
24+
compiler (protoc) for Bazel
2325
* [September 19, 2025](/news/2025-09-19) - Breaking
2426
changes in the upcoming 34.x release
2527
* [July 16, 2025](/news/2025-07-16) - Resuming support

0 commit comments

Comments
 (0)