build/toolchain/protobuf: fix duplicate protoc build

We were building way too many copies of protoc. Many of these are due to
a bug in rules_go when --incompatible_enable_proto_toolchain_resolution
is enabled, but not all, so we should do this anyway, and then the bug
in rules_go is no longer relevant.

Before:
bazel cquery "deps(//...) intersect @protobuf//:protoc"
@protobuf//:protoc (e5c4511)
@protobuf//:protoc (40d0309)
@protobuf//:protoc (3bbe29a)
@protobuf//:protoc (070fbf5)
@protobuf//:protoc (ee343a7)
@protobuf//:protoc (c3e4ff6)

After:
bazel cquery "deps(//... except //build/toolchain/protobuf/...) intersect @protobuf//:protoc"
@protobuf//:protoc (ee343a7)

Change-Id: I6a826b7bc01453284982204aea808f8f2902d84c
Reviewed-on: https://review.monogon.dev/c/monogon/+/4164
Reviewed-by: Tim Windelschmidt <tim@monogon.tech>
Tested-by: Jenkins CI
diff --git a/osbase/build/def.bzl b/osbase/build/def.bzl
index d9be587..b047d8b 100644
--- a/osbase/build/def.bzl
+++ b/osbase/build/def.bzl
@@ -18,7 +18,7 @@
     ],
 )
 
-def _forward_impl(ctx):
+def forward_impl(ctx):
     # We can't pass DefaultInfo through as-is, since Bazel forbids executable
     # if it's a file declared in a different target. To emulate that, symlink
     # to the original executable, if there is one.
@@ -46,7 +46,7 @@
 
 build_static_target = rule(
     cfg = build_static_transition,
-    implementation = _forward_impl,
+    implementation = forward_impl,
     attrs = {
         "dep": attr.label(mandatory = True),
     },
@@ -89,7 +89,7 @@
 
 ignore_unused_configuration_target = rule(
     cfg = ignore_unused_configuration,
-    implementation = _forward_impl,
+    implementation = forward_impl,
     attrs = {
         "dep": attr.label(mandatory = True),
     },