[bazel] Add default shell env to gen_well_known_protos_java

We may need the shell environment (potentially augmented with
`--action_env`) to invoke protoc on Windows. If protoc was built with
mingw, it probably needs .dll files in non-default locations that must be
in PATH. Previously with `--compiler=mingw-gcc`,
`bazel build //:gen_well_known_protos_java` would fail on Windows. This
CL fixes the issue.

Also we have `default_shell_env` set to True for `ProtoCompile`, this makes
the behavior consistent.

See #2933, and
585a27ad0a/proto/compiler.bzl (L130)
pull/7834/head
Adam Yi 4 years ago committed by Adam Cozzette
parent 543817295e
commit 88f3ef7d1d
  1. 1
      protobuf.bzl

@ -352,6 +352,7 @@ def _internal_gen_well_known_protos_java_impl(ctx):
inputs = descriptors, inputs = descriptors,
outputs = [srcjar], outputs = [srcjar],
arguments = [args], arguments = [args],
use_default_shell_env = True,
) )
return [ return [

Loading…
Cancel
Save