Add more fixes
This commit is contained in:
parent
46b321abe5
commit
eb9851616b
5
third_party/common.bzl
vendored
5
third_party/common.bzl
vendored
@ -21,7 +21,7 @@
|
|||||||
# substitutions: A dictionary mapping strings to their substitutions
|
# substitutions: A dictionary mapping strings to their substitutions
|
||||||
|
|
||||||
def template_rule_impl(ctx):
|
def template_rule_impl(ctx):
|
||||||
ctx.template_action(
|
ctx.actions.expand_template(
|
||||||
template = ctx.file.src,
|
template = ctx.file.src,
|
||||||
output = ctx.outputs.out,
|
output = ctx.outputs.out,
|
||||||
substitutions = ctx.attr.substitutions,
|
substitutions = ctx.attr.substitutions,
|
||||||
@ -31,8 +31,7 @@ template_rule = rule(
|
|||||||
attrs = {
|
attrs = {
|
||||||
"src": attr.label(
|
"src": attr.label(
|
||||||
mandatory = True,
|
mandatory = True,
|
||||||
allow_files = True,
|
allow_single_file = True,
|
||||||
single_file = True,
|
|
||||||
),
|
),
|
||||||
"substitutions": attr.string_dict(mandatory = True),
|
"substitutions": attr.string_dict(mandatory = True),
|
||||||
"out": attr.output(mandatory = True),
|
"out": attr.output(mandatory = True),
|
||||||
|
4
third_party/systemlibs/protobuf.bzl
vendored
4
third_party/systemlibs/protobuf.bzl
vendored
@ -107,7 +107,7 @@ def _proto_gen_impl(ctx):
|
|||||||
inputs += [plugin]
|
inputs += [plugin]
|
||||||
|
|
||||||
if args:
|
if args:
|
||||||
ctx.action(
|
ctx.actions.run(
|
||||||
inputs = inputs,
|
inputs = inputs,
|
||||||
outputs = ctx.outputs.outs,
|
outputs = ctx.outputs.outs,
|
||||||
arguments = args + import_flags + [s.path for s in srcs],
|
arguments = args + import_flags + [s.path for s in srcs],
|
||||||
@ -132,7 +132,7 @@ proto_gen = rule(
|
|||||||
"protoc": attr.label(
|
"protoc": attr.label(
|
||||||
cfg = "host",
|
cfg = "host",
|
||||||
executable = True,
|
executable = True,
|
||||||
single_file = True,
|
allow_single_file = True,
|
||||||
mandatory = True,
|
mandatory = True,
|
||||||
),
|
),
|
||||||
"plugin": attr.label(
|
"plugin": attr.label(
|
||||||
|
Loading…
Reference in New Issue
Block a user