Skip to content

Commit

Permalink
Enable to build protobuf v30 with Bazel+MSVC
Browse files Browse the repository at this point in the history
As seen in the following thread, the protobuf team is planning to stop
supporting the combination of Bazel and cl.exe due to well-known its
path length limitation.

 * protocolbuffers/protobuf#20085

As a preparation before switching to protobuf v30 (google#1177), let's
explicitly add a commandline option as explained to continue using this
combination as a short term solution.

This commit should have no impact on Probobuf v29.x.
  • Loading branch information
yukawa committed Feb 9, 2025
1 parent 3baa8d8 commit ea73299
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ build:compiler_msvc_like --copt "/J" --host_copt "/J"
build:compiler_msvc_like --copt "/utf-8" --host_copt "/utf-8"
build:compiler_msvc_like --cxxopt "/J" --host_cxxopt "/J"
build:compiler_msvc_like --cxxopt "/utf-8" --host_cxxopt "/utf-8"
## See https://github.com/protocolbuffers/protobuf/issues/20085
## This can be removed if we can switch to clang-cl for Windows
build:compiler_msvc_like --define=protobuf_allow_msvc=true

## Linux specific options
build:linux_env --build_tag_filters=-nolinux --copt "-fPIC"
Expand Down

0 comments on commit ea73299

Please sign in to comment.