aboutsummaryrefslogtreecommitdiffhomepage
path: root/bazel/generate_cc.bzl
diff options
context:
space:
mode:
Diffstat (limited to 'bazel/generate_cc.bzl')
-rw-r--r--bazel/generate_cc.bzl4
1 files changed, 3 insertions, 1 deletions
diff --git a/bazel/generate_cc.bzl b/bazel/generate_cc.bzl
index 3665733681..d49cbe8d72 100644
--- a/bazel/generate_cc.bzl
+++ b/bazel/generate_cc.bzl
@@ -24,13 +24,15 @@ def generate_cc_impl(ctx):
if ctx.executable.plugin:
arguments += ["--plugin=protoc-gen-PLUGIN=" + ctx.executable.plugin.path]
arguments += ["--PLUGIN_out=" + ",".join(ctx.attr.flags) + ":" + dir_out]
+ additional_input = [ctx.executable.plugin]
else:
arguments += ["--cpp_out=" + ",".join(ctx.attr.flags) + ":" + dir_out]
+ additional_input = []
arguments += ["-I{0}={0}".format(include.path) for include in includes]
arguments += [proto.path for proto in protos]
ctx.action(
- inputs = protos + includes,
+ inputs = protos + includes + additional_input,
outputs = out_files,
executable = ctx.executable._protoc,
arguments = arguments,