[go_proto_src] Symlink instead of copy
@@ -10,12 +10,9 @@ def _go_proto_src_impl(ctx):
"""Copy the generated source of a go_proto_library."""
lib = ctx.attr.library
for src in lib.actions[0].outputs.to_list():
- out = ctx.outputs.generated
- ctx.actions.run_shell(
- outputs = [out],
- inputs = [src],
- arguments = [src.path, out.path],
- command = "cp $1 $2",
+ ctx.actions.symlink(
+ output = ctx.outputs.generated,
+ target_file = src,
)
break
