return true
case "darwin-amd64":
return true
+ case "freebsd-amd64":
+ return true
}
return false
case "pie":
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)
}
default:
return badmode()
}
- case "darwin":
+ case "darwin", "freebsd":
switch objabi.GOARCH {
case "amd64":
default:
// 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
// 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
// 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