Skip to content

Commit ea73299

Browse files
committed
Enable to build protobuf v30 with Bazel+MSVC
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.
1 parent 3baa8d8 commit ea73299

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/.bazelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ build:compiler_msvc_like --copt "/J" --host_copt "/J"
4343
build:compiler_msvc_like --copt "/utf-8" --host_copt "/utf-8"
4444
build:compiler_msvc_like --cxxopt "/J" --host_cxxopt "/J"
4545
build:compiler_msvc_like --cxxopt "/utf-8" --host_cxxopt "/utf-8"
46+
## See https://github.com/protocolbuffers/protobuf/issues/20085
47+
## This can be removed if we can switch to clang-cl for Windows
48+
build:compiler_msvc_like --define=protobuf_allow_msvc=true
4649

4750
## Linux specific options
4851
build:linux_env --build_tag_filters=-nolinux --copt "-fPIC"

0 commit comments

Comments
 (0)