platform

package standard library
go1.21rc2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2023 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ASanSupported

func ASanSupported(goos, goarch string) bool

ASanSupported reports whether goos/goarch supports the address sanitizer option.

func BuildModeSupported

func BuildModeSupported(compiler, buildmode, goos, goarch string) bool

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

func CgoSupported(goos, goarch string) bool

CgoSupported reports whether goos/goarch supports cgo.

func DefaultPIE added in go1.21.0

func DefaultPIE(goos, goarch string, isRace bool) bool

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

func ExecutableHasDWARF(goos, goarch string) bool

ExecutableHasDWARF reports whether the linked executable includes DWARF symbols on goos/goarch.

func FuzzInstrumented

func FuzzInstrumented(goos, goarch string) bool

FuzzInstrumented reports whether fuzzing on goos/goarch uses coverage instrumentation. (FuzzInstrumented implies FuzzSupported.)

func FuzzSupported

func FuzzSupported(goos, goarch string) bool

FuzzSupported reports whether goos/goarch supports fuzzing ('go test -fuzz=.').

func InternalLinkPIESupported

func InternalLinkPIESupported(goos, goarch string) bool

func MSanSupported

func MSanSupported(goos, goarch string) bool

MSanSupported reports whether goos/goarch supports the memory sanitizer option.

func MustLinkExternal

func MustLinkExternal(goos, goarch string, withCgo bool) bool

MustLinkExternal reports whether goos/goarch requires external linking with or without cgo dependencies.

func RaceDetectorSupported

func RaceDetectorSupported(goos, goarch string) bool

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.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL