treewide: migrate to toolchain_cc

This contains the first part of the toolchain_cc migration. It leaves
the native host GCC, but everything that we ship is now built with
toolchain_cc with the exception of Linux which gets migrated later in
this stack.

Change-Id: Icb3422857fd3baf0ff61b7edd5754517f6a73dfc
Reviewed-on: https://review.monogon.dev/c/monogon/+/4012
Tested-by: Jenkins CI
Reviewed-by: Tim Windelschmidt <tim@monogon.tech>
diff --git a/osbase/build/def.bzl b/osbase/build/def.bzl
index 685c616..c7f189a 100644
--- a/osbase/build/def.bzl
+++ b/osbase/build/def.bzl
@@ -6,7 +6,7 @@
     """
     return {
         "@io_bazel_rules_go//go/config:static": True,
-        "//build/platforms/linkmode:static": True,
+        "@toolchain_cc_mngn//buildmode:static": True,
     }
 
 build_static_transition = transition(
@@ -14,7 +14,7 @@
     inputs = [],
     outputs = [
         "@io_bazel_rules_go//go/config:static",
-        "//build/platforms/linkmode:static",
+        "@toolchain_cc_mngn//buildmode:static",
     ],
 )
 
@@ -61,7 +61,7 @@
     # to a stable hash.
     # See the transition's comment block for more information.
     "@io_bazel_rules_go//go/config:static": False,
-    "//build/platforms/linkmode:static": False,
+    "@toolchain_cc_mngn//buildmode:static": False,
 }
 
 def _ignore_unused_configuration_impl(_settings, _attr):