Documentation ¶
Index ¶
- Variables
- func ASanSupported(goos, goarch string) bool
- func Broken(goos, goarch string) bool
- func BuildModeSupported(compiler, buildmode, goos, goarch string) bool
- func CgoSupported(goos, goarch string) bool
- func DefaultPIE(goos, goarch string, isRace bool) bool
- func ExecutableHasDWARF(goos, goarch string) bool
- func FirstClass(goos, goarch string) bool
- func FuzzInstrumented(goos, goarch string) bool
- func FuzzSupported(goos, goarch string) bool
- func InternalLinkPIESupported(goos, goarch string) bool
- func MSanSupported(goos, goarch string) bool
- func MustLinkExternal(goos, goarch string, withCgo bool) bool
- func RaceDetectorSupported(goos, goarch string) bool
- type OSArch
Constants ¶
This section is empty.
Variables ¶
var List = []OSArch{
{"aix", "ppc64"},
{"android", "386"},
{"android", "amd64"},
{"android", "arm"},
{"android", "arm64"},
{"darwin", "amd64"},
{"darwin", "arm64"},
{"dragonfly", "amd64"},
{"freebsd", "386"},
{"freebsd", "amd64"},
{"freebsd", "arm"},
{"freebsd", "arm64"},
{"freebsd", "riscv64"},
{"illumos", "amd64"},
{"ios", "amd64"},
{"ios", "arm64"},
{"js", "wasm"},
{"linux", "386"},
{"linux", "amd64"},
{"linux", "arm"},
{"linux", "arm64"},
{"linux", "loong64"},
{"linux", "mips"},
{"linux", "mips64"},
{"linux", "mips64le"},
{"linux", "mipsle"},
{"linux", "ppc64"},
{"linux", "ppc64le"},
{"linux", "riscv64"},
{"linux", "s390x"},
{"linux", "sparc64"},
{"netbsd", "386"},
{"netbsd", "amd64"},
{"netbsd", "arm"},
{"netbsd", "arm64"},
{"openbsd", "386"},
{"openbsd", "amd64"},
{"openbsd", "arm"},
{"openbsd", "arm64"},
{"openbsd", "mips64"},
{"openbsd", "ppc64"},
{"plan9", "386"},
{"plan9", "amd64"},
{"plan9", "arm"},
{"solaris", "amd64"},
{"wasip1", "wasm"},
{"windows", "386"},
{"windows", "amd64"},
{"windows", "arm"},
{"windows", "arm64"},
}
List is the list of all valid GOOS/GOARCH combinations, including known-broken ports.
Functions ¶
func ASanSupported ¶
ASanSupported reports whether goos/goarch supports the address sanitizer option.
func Broken ¶ added in go1.21.0
Broken reportsr whether goos/goarch is considered a broken port. (See https://go.dev/wiki/PortingPolicy#broken-ports.)
func BuildModeSupported ¶
BuildModeSupported reports whether goos/goarch supports the given build mode using the given compiler. There is a copy of this function in cmd/dist/test.go.
func CgoSupported ¶ added in go1.21.0
CgoSupported reports whether goos/goarch supports cgo.
func DefaultPIE ¶ added in go1.21.0
DefaultPIE reports whether goos/goarch produces a PIE binary when using the "default" buildmode. On Windows this is affected by -race, so force the caller to pass that in to centralize that choice.
func ExecutableHasDWARF ¶ added in go1.21.0
ExecutableHasDWARF reports whether the linked executable includes DWARF symbols on goos/goarch.
func FirstClass ¶ added in go1.21.0
FirstClass reports whether goos/goarch is considered a “first class” port. (See https://go.dev/wiki/PortingPolicy#first-class-ports.)
func FuzzInstrumented ¶
FuzzInstrumented reports whether fuzzing on goos/goarch uses coverage instrumentation. (FuzzInstrumented implies FuzzSupported.)
func FuzzSupported ¶
FuzzSupported reports whether goos/goarch supports fuzzing ('go test -fuzz=.').
func MSanSupported ¶
MSanSupported reports whether goos/goarch supports the memory sanitizer option.
func MustLinkExternal ¶
MustLinkExternal reports whether goos/goarch requires external linking with or without cgo dependencies.
func RaceDetectorSupported ¶
RaceDetectorSupported reports whether goos/goarch supports the race detector. There is a copy of this function in cmd/dist/test.go. Race detector only supports 48-bit VMA on arm64. But it will always return true for arm64, because we don't have VMA size information during the compile time.