From 4c0661bb80c58c8de366f25b909df562c3300fff Mon Sep 17 00:00:00 2001 From: Antonio Huete Jimenez Date: Wed, 25 Sep 2024 00:43:11 +0200 Subject: [PATCH] plugin: add support for dragonfly/amd64 --- src/cmd/dist/test.go | 2 +- src/internal/platform/supported.go | 2 +- src/plugin/plugin.go | 4 ++-- src/plugin/plugin_dlopen.go | 2 +- src/plugin/plugin_stubs.go | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go index 0facfb579cb19..6c8bc0569200a 100644 --- a/src/cmd/dist/test.go +++ b/src/cmd/dist/test.go @@ -1663,7 +1663,7 @@ func buildModeSupported(compiler, buildmode, goos, goarch string) bool { case "linux/amd64", "linux/arm", "linux/arm64", "linux/386", "linux/loong64", "linux/s390x", "linux/ppc64le", "android/amd64", "android/386", "darwin/amd64", "darwin/arm64", - "freebsd/amd64": + "freebsd/amd64", "dragonfly/amd64": return true } return false diff --git a/src/internal/platform/supported.go b/src/internal/platform/supported.go index 193658f878b58..9176b69063e88 100644 --- a/src/internal/platform/supported.go +++ b/src/internal/platform/supported.go @@ -211,7 +211,7 @@ func BuildModeSupported(compiler, buildmode, goos, goarch string) bool { case "linux/amd64", "linux/arm", "linux/arm64", "linux/386", "linux/loong64", "linux/s390x", "linux/ppc64le", "android/amd64", "android/386", "darwin/amd64", "darwin/arm64", - "freebsd/amd64": + "freebsd/amd64", "dragonfly/amd64": return true } return false diff --git a/src/plugin/plugin.go b/src/plugin/plugin.go index a4ff694eb5707..4e9aaf3770ce7 100644 --- a/src/plugin/plugin.go +++ b/src/plugin/plugin.go @@ -25,8 +25,8 @@ // However, the plugin mechanism has many significant drawbacks that // should be considered carefully during the design. For example: // -// - Plugins are currently supported only on Linux, FreeBSD, and -// macOS, making them unsuitable for applications intended to be +// - Plugins are currently supported only on Linux, FreeBSD, DragonFly BSD +// and macOS, making them unsuitable for applications intended to be // portable. // // - Plugins are poorly supported by the Go race detector. Even simple diff --git a/src/plugin/plugin_dlopen.go b/src/plugin/plugin_dlopen.go index f6ae219d95efc..5304fa93ed776 100644 --- a/src/plugin/plugin_dlopen.go +++ b/src/plugin/plugin_dlopen.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build (linux && cgo) || (darwin && cgo) || (freebsd && cgo) +//go:build (linux && cgo) || (darwin && cgo) || (freebsd && cgo) || (dragonfly && cgo) package plugin diff --git a/src/plugin/plugin_stubs.go b/src/plugin/plugin_stubs.go index 2e9492e7c657e..db3674b40b3e7 100644 --- a/src/plugin/plugin_stubs.go +++ b/src/plugin/plugin_stubs.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build (!linux && !freebsd && !darwin) || !cgo +//go:build (!linux && !freebsd && !darwin && !dragonfly) || !cgo package plugin