buildcfg

Imports

Imports #

"fmt"
"os"
"path/filepath"
"strconv"
"strings"
"fmt"
"reflect"
"strings"
"internal/goexperiment"
"runtime"

Constants & Variables

DefaultGO386 const #

const DefaultGO386 = `sse2`

DefaultGOAMD64 const #

const DefaultGOAMD64 = `v1`

DefaultGOARM const #

const DefaultGOARM = `7`

DefaultGOARM64 const #

const DefaultGOARM64 = `v8.0`

DefaultGOEXPERIMENT const #

DefaultGOEXPERIMENT is the embedded default GOEXPERIMENT string. It is not guaranteed to be canonical.

const DefaultGOEXPERIMENT = defaultGOEXPERIMENT

DefaultGOFIPS140 const #

const DefaultGOFIPS140 = `off`

DefaultGOMIPS const #

const DefaultGOMIPS = `hardfloat`

DefaultGOMIPS64 const #

const DefaultGOMIPS64 = `hardfloat`

DefaultGOPPC64 const #

const DefaultGOPPC64 = `power8`

DefaultGORISCV64 const #

const DefaultGORISCV64 = `rva20u64`

Error var #

Error is one of the errors found (if any) in the build configuration.

var Error error

Experiment var #

Experiment contains the toolchain experiments enabled for the current build. (This is not necessarily the set of experiments the compiler itself was built with.) experimentBaseline specifies the experiment flags that are enabled by default in the current toolchain. This is, in effect, the "control" configuration and any variation from this is an experiment.

var Experiment ExperimentFlags = *ast.CallExpr

FramePointerEnabled var #

FramePointerEnabled enables the use of platform conventions for saving frame pointers. This used to be an experiment, but now it's always enabled on platforms that support it. Note: must agree with runtime.framepointer_enabled.

var FramePointerEnabled = *ast.BinaryExpr

GO386 var #

var GO386 = *ast.CallExpr

GOAMD64 var #

var GOAMD64 = *ast.CallExpr

GOARCH var #

var GOARCH = *ast.CallExpr

GOARM var #

var GOARM = *ast.CallExpr

GOARM64 var #

var GOARM64 = *ast.CallExpr

GOFIPS140 var #

var GOFIPS140 = *ast.CallExpr

GOMIPS var #

var GOMIPS = *ast.CallExpr

GOMIPS64 var #

var GOMIPS64 = *ast.CallExpr

GOOS var #

var GOOS = *ast.CallExpr

GOPPC64 var #

var GOPPC64 = *ast.CallExpr

GORISCV64 var #

var GORISCV64 = *ast.CallExpr

GOROOT var #

var GOROOT = *ast.CallExpr

GOWASM var #

var GOWASM = *ast.CallExpr

GO_LDSO var #

var GO_LDSO = defaultGO_LDSO

ToolTags var #

var ToolTags = *ast.CallExpr

Version var #

var Version = version

defaultGOARCH const #

const defaultGOARCH = runtime.GOARCH

defaultGOEXPERIMENT const #

const defaultGOEXPERIMENT = ``

defaultGOOS const #

const defaultGOOS = runtime.GOOS

defaultGO_LDSO const #

const defaultGO_LDSO = ``

version const #

const version = `go1.24.5`

Structs

ExperimentFlags struct #

ExperimentFlags represents a set of GOEXPERIMENT flags relative to a baseline (platform-default) experiment configuration.

type ExperimentFlags struct {
goexperiment.Flags
baseline goexperiment.Flags
}

Goarm64Features struct #

type Goarm64Features struct {
Version string
LSE bool
Crypto bool
}

GoarmFeatures struct #

type GoarmFeatures struct {
Version int
SoftFloat bool
}

gowasmFeatures struct #

type gowasmFeatures struct {
SatConv bool
SignExt bool
}

Functions

All method #

All returns a list of all experiment settings. Disabled experiments appear in the list prefixed by "no".

func (exp *ExperimentFlags) All() []string

Check function #

Check exits the program with a fatal error if Error is non-nil.

func Check()

Enabled method #

Enabled returns a list of enabled experiments, as lower-cased experiment names.

func (exp *ExperimentFlags) Enabled() []string

GOGOARCH function #

GOGOARCH returns the name and value of the GO$GOARCH setting. For example, if GOARCH is "amd64" it might return "GOAMD64", "v2".

func GOGOARCH() (name string, value string)

Getgoextlinkenabled function #

func Getgoextlinkenabled() string

ParseGOEXPERIMENT function #

ParseGOEXPERIMENT parses a (GOOS, GOARCH, GOEXPERIMENT) configuration tuple and returns the enabled and baseline experiment flag sets. TODO(mdempsky): Move to internal/goexperiment.

func ParseGOEXPERIMENT(goos string, goarch string, goexp string) (*ExperimentFlags, error)

ParseGoarm64 function #

func ParseGoarm64(v string) (g Goarm64Features, e error)

String method #

func (g GoarmFeatures) String() string

String method #

func (g Goarm64Features) String() string

String method #

String returns the canonical GOEXPERIMENT string to enable this experiment configuration. (Experiments in the same state as in the baseline are elided.)

func (exp *ExperimentFlags) String() string

String method #

func (f gowasmFeatures) String() string

Supports method #

Returns true if g supports giving ARM64 ISA Note that this function doesn't accept / test suffixes (like ",lse" or ",crypto")

func (g Goarm64Features) Supports(s string) bool

envOr function #

func envOr(key string, value string) string

expList function #

expList returns the list of lower-cased experiment names for experiments that differ from base. base may be nil to indicate no experiments. If all is true, then include all experiment flags, regardless of base.

func expList(exp *goexperiment.Flags, base *goexperiment.Flags, all bool) []string

experimentTags function #

func experimentTags() []string

goamd64 function #

func goamd64() int

goarm function #

func goarm() (g GoarmFeatures)

goarm64 function #

func goarm64() (g Goarm64Features)

gofips140 function #

func gofips140() string

gogoarchTags function #

func gogoarchTags() []string

gomips function #

func gomips() string

gomips64 function #

func gomips64() string

goppc64 function #

func goppc64() int

goriscv64 function #

func goriscv64() int

gowasm function #

func gowasm() (f gowasmFeatures)

isFIPSVersion function #

isFIPSVersion reports whether v is a valid FIPS version, of the form vX.Y.Z.

func isFIPSVersion(v string) bool

skipNum function #

skipNum skips the leading text matching [0-9]+ in s, returning the rest and whether such text was found.

func skipNum(s string) (rest string, ok bool)

toolTags function #

func toolTags() []string

Generated with Arrow