Commit 88ca80b3 authored by Ayan George's avatar Ayan George Committed by Ian Lance Taylor

plugin: add freebsd/amd64 plugin support

Change-Id: I4e7b0e99fd0f6f7d6a8ef60e9d3cb5baeb80a2b6
Reviewed-on: https://go-review.googlesource.com/c/go/+/191617
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
parent 9f5127bf
......@@ -972,6 +972,8 @@ func (t *tester) supportedBuildmode(mode string) bool {
return true
case "darwin-amd64":
return true
case "freebsd-amd64":
return true
}
return false
case "pie":
......
......@@ -197,6 +197,7 @@ func buildModeInit() {
case "darwin/amd64":
// Skip DWARF generation due to #21647
forcedLdflags = append(forcedLdflags, "-w")
case "freebsd/amd64":
default:
base.Fatalf("-buildmode=plugin not supported on %s\n", platform)
}
......
......@@ -95,7 +95,7 @@ func (mode *BuildMode) Set(s string) error {
default:
return badmode()
}
case "darwin":
case "darwin", "freebsd":
switch objabi.GOARCH {
case "amd64":
default:
......
......@@ -13,7 +13,7 @@
// already part of the program are called. The main function is not run.
// A plugin is only initialized once, and cannot be closed.
//
// Currently plugins are only supported on Linux and macOS.
// Currently plugins are only supported on Linux, FreeBSD, and macOS.
// Please report any issues.
package plugin
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build linux,cgo darwin,cgo
// +build linux,cgo darwin,cgo freebsd,cgo
package plugin
......
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build !linux,!darwin !cgo
// +build !linux,!freebsd,!darwin !cgo
package plugin
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment