systemlibs: protobuf: update for --incompatible_no_support_tools_in_action_inputs

Just the minimal changes needed to work with the change instead of
pulling the entire updated file which would be a much larger change

Signed-off-by: Jason Zaman <jason@perfinion.com>
This commit is contained in:
Jason Zaman 2020-04-08 03:15:14 +08:00
parent c85b5d0c17
commit 9cee90ac95
1 changed files with 3 additions and 1 deletions

View File

@ -93,6 +93,7 @@ def _proto_gen_impl(ctx):
args += ["--python_out=" + gen_dir]
inputs = srcs + deps
tools = [ctx.executable.protoc]
if ctx.executable.plugin:
plugin = ctx.executable.plugin
lang = ctx.attr.plugin_language
@ -106,7 +107,7 @@ def _proto_gen_impl(ctx):
outdir = ",".join(ctx.attr.plugin_options) + ":" + outdir
args += ["--plugin=protoc-gen-%s=%s" % (lang, plugin.path)]
args += ["--%s_out=%s" % (lang, outdir)]
inputs += [plugin]
tools.append(plugin)
if args:
ctx.actions.run(
@ -115,6 +116,7 @@ def _proto_gen_impl(ctx):
arguments = args + import_flags + [s.path for s in srcs],
executable = ctx.executable.protoc,
mnemonic = "ProtoCompile",
tools = tools,
use_default_shell_env = True,
)