List var #
List is the list of all valid GOOS/GOARCH combinations, including known-broken ports.
var List = []OSArch{...}List is the list of all valid GOOS/GOARCH combinations, including known-broken ports.
var List = []OSArch{...}var distInfo = map[OSArch]osArchInfo{...}An OSArch is a pair of GOOS and GOARCH values indicating a platform.
type OSArch struct {
GOOS string
GOARCH string
}osArchInfo describes information about an OSArch extracted from cmd/dist and stored in the generated distInfo map.
type osArchInfo struct {
CgoSupported bool
FirstClass bool
Broken bool
}ASanSupported reports whether goos/goarch supports the address sanitizer option.
func ASanSupported(goos string, goarch string) boolBroken reports whether goos/goarch is considered a broken port. (See https://go.dev/wiki/PortingPolicy#broken-ports.)
func Broken(goos string, goarch string) boolBuildModeSupported 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 BuildModeSupported(compiler string, buildmode string, goos string, goarch string) boolCgoSupported reports whether goos/goarch supports cgo.
func CgoSupported(goos string, goarch string) boolDefaultPIE 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 DefaultPIE(goos string, goarch string, isRace bool) boolExecutableHasDWARF reports whether the linked executable includes DWARF symbols on goos/goarch.
func ExecutableHasDWARF(goos string, goarch string) boolFirstClass reports whether goos/goarch is considered a “first class” port. (See https://go.dev/wiki/PortingPolicy#first-class-ports.)
func FirstClass(goos string, goarch string) boolFuzzInstrumented reports whether fuzzing on goos/goarch uses coverage instrumentation. (FuzzInstrumented implies FuzzSupported.)
func FuzzInstrumented(goos string, goarch string) boolFuzzSupported reports whether goos/goarch supports fuzzing ('go test -fuzz=.').
func FuzzSupported(goos string, goarch string) boolfunc InternalLinkPIESupported(goos string, goarch string) boolMSanSupported reports whether goos/goarch supports the memory sanitizer option.
func MSanSupported(goos string, goarch string) boolMustLinkExternal reports whether goos/goarch requires external linking with or without cgo dependencies.
func MustLinkExternal(goos string, goarch string, withCgo bool) boolRaceDetectorSupported 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.
func RaceDetectorSupported(goos string, goarch string) boolfunc (p OSArch) String() stringGenerated with Arrow