Merge pull request #7316 from thaJeztah/plugin_less_restrictive

plugin: remove go < 1.8 stub, enable on windows and arm64
This commit is contained in:
Derek McGowan 2023-05-09 22:29:44 -07:00 committed by GitHub
commit 49029b75ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 4 deletions

View File

@ -138,7 +138,11 @@ var register = struct {
r []*Registration r []*Registration
}{} }{}
// Load loads all plugins at the provided path into containerd // Load loads all plugins at the provided path into containerd.
//
// Load is currently only implemented on non-static, non-gccgo builds for amd64
// and arm64, and plugins must be built with the exact same version of Go as
// containerd itself.
func Load(path string) (err error) { func Load(path string) (err error) {
defer func() { defer func() {
if v := recover(); v != nil { if v := recover(); v != nil {

View File

@ -1,4 +1,4 @@
//go:build go1.8 && !windows && amd64 && !static_build && !gccgo //go:build (amd64 || arm64) && !static_build && !gccgo
/* /*
Copyright The containerd Authors. Copyright The containerd Authors.

View File

@ -1,4 +1,4 @@
//go:build !go1.8 || windows || !amd64 || static_build || gccgo //go:build (!amd64 && !arm64) || static_build || gccgo
/* /*
Copyright The containerd Authors. Copyright The containerd Authors.
@ -18,7 +18,11 @@
package plugin package plugin
// loadPlugins is not supported;
//
// - with gccgo: gccgo has no plugin support golang/go#36403
// - on static builds; https://github.com/containerd/containerd/commit/0d682e24a1ba8e93e5e54a73d64f7d256f87492f
// - on architectures other than amd64 and arm64 (other architectures need to be tested)
func loadPlugins(path string) error { func loadPlugins(path string) error {
// plugins not supported until 1.8
return nil return nil
} }