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:
parent
c85b5d0c17
commit
9cee90ac95
4
third_party/systemlibs/protobuf.bzl
vendored
4
third_party/systemlibs/protobuf.bzl
vendored
@ -93,6 +93,7 @@ def _proto_gen_impl(ctx):
|
|||||||
args += ["--python_out=" + gen_dir]
|
args += ["--python_out=" + gen_dir]
|
||||||
|
|
||||||
inputs = srcs + deps
|
inputs = srcs + deps
|
||||||
|
tools = [ctx.executable.protoc]
|
||||||
if ctx.executable.plugin:
|
if ctx.executable.plugin:
|
||||||
plugin = ctx.executable.plugin
|
plugin = ctx.executable.plugin
|
||||||
lang = ctx.attr.plugin_language
|
lang = ctx.attr.plugin_language
|
||||||
@ -106,7 +107,7 @@ def _proto_gen_impl(ctx):
|
|||||||
outdir = ",".join(ctx.attr.plugin_options) + ":" + outdir
|
outdir = ",".join(ctx.attr.plugin_options) + ":" + outdir
|
||||||
args += ["--plugin=protoc-gen-%s=%s" % (lang, plugin.path)]
|
args += ["--plugin=protoc-gen-%s=%s" % (lang, plugin.path)]
|
||||||
args += ["--%s_out=%s" % (lang, outdir)]
|
args += ["--%s_out=%s" % (lang, outdir)]
|
||||||
inputs += [plugin]
|
tools.append(plugin)
|
||||||
|
|
||||||
if args:
|
if args:
|
||||||
ctx.actions.run(
|
ctx.actions.run(
|
||||||
@ -115,6 +116,7 @@ def _proto_gen_impl(ctx):
|
|||||||
arguments = args + import_flags + [s.path for s in srcs],
|
arguments = args + import_flags + [s.path for s in srcs],
|
||||||
executable = ctx.executable.protoc,
|
executable = ctx.executable.protoc,
|
||||||
mnemonic = "ProtoCompile",
|
mnemonic = "ProtoCompile",
|
||||||
|
tools = tools,
|
||||||
use_default_shell_env = True,
|
use_default_shell_env = True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user