treewide: enable pure Go by default
Pure can be safely enabled by default. For those targets which need cgo,
we can set `pure = "off"` on the go_binary or go_test.
This simplifies transitions, and makes the files/files_cc distinction
obsolete.
Change-Id: Ic1a985e7d347a7222f55735c1ee2016e8a7e1c65
Reviewed-on: https://review.monogon.dev/c/monogon/+/4158
Tested-by: Jenkins CI
Reviewed-by: Tim Windelschmidt <tim@monogon.tech>
diff --git a/metropolis/node/BUILD.bazel b/metropolis/node/BUILD.bazel
index a7e9f9a..3bd70e9 100644
--- a/metropolis/node/BUILD.bazel
+++ b/metropolis/node/BUILD.bazel
@@ -45,11 +45,13 @@
"netgo",
"seccomp",
],
+ pure = "off",
)
erofs_image(
name = "rootfs",
files = {
+ "/init": "//metropolis/node/core/minit",
"/core": "//metropolis/node/core",
# CA Certificate bundle & os-release & resolv.conf & hosts
@@ -71,7 +73,8 @@
"/containerd/bin/runsc": "@dev_gvisor_gvisor//runsc",
"/containerd/bin/containerd-shim-runsc-v1": "@dev_gvisor_gvisor//shim",
- # runc (runtime in files_cc because of cgo)
+ # runc
+ "/containerd/bin/runc": ":runc",
"/containerd/bin/containerd-shim-runc-v2": "@com_github_containerd_containerd_v2//cmd/containerd-shim-runc-v2",
# Containerd
@@ -93,12 +96,11 @@
# Delve
"/dlv": "@com_github_go_delve_delve//cmd/dlv:dlv",
- },
- files_cc = {
- "/init": "//metropolis/node/core/minit",
- # runc runtime, with cgo
- "/containerd/bin/runc": ":runc",
+
+ # file system tools
"/bin/mkfs.xfs": "@xfsprogs//:mkfs",
+
+ # time
"/time/chrony": "@chrony//:chrony",
},
fsspecs = [