package buildcfg

Import Path
	internal/buildcfg (on

Dependency Relation
	imports 8 packages, and imported by 2 packages

Involved Source Files Package buildcfg provides access to the build configuration described by the current environment. It is for use by build tools such as cmd/go or cmd/compile and for setting up go/build's Default context. Note that it does NOT provide access to the build configuration used to build the currently-running binary. For that, use runtime.GOOS etc as well as internal/goexperiment. exp.go zbootstrap.go
Package-Level Type Names (only one)
/* sort by: | */
ExperimentFlags represents a set of GOEXPERIMENT flags relative to a baseline (platform-default) experiment configuration. Flags goexperiment.Flags AllocHeaders enables a different, more efficient way for the GC to manage heap metadata. Arenas causes the "arena" standard library package to be visible to the outside world. Flags.BoringCrypto bool CacheProg adds support to cmd/go to use a child process to implement the build cache; see CgoCheck2 enables an expensive cgo rule checker. When this experiment is enabled, cgo rule checks occur regardless of the GODEBUG=cgocheck setting provided at runtime. CoverageRedesign enables the new compiler-based code coverage tooling. ExecTracer2 controls whether to use the new execution trace implementation. Flags.FieldTrack bool HeapMinimum512KiB reduces the minimum heap size to 512 KiB. This was originally reduced as part of PacerRedesign, but has been broken out to its own experiment that is disabled by default. LoopVar changes loop semantics so that each iteration gets its own copy of the iteration variable. NewInliner enables a new+improved version of the function inlining phase within the Go compiler. PageTrace enables GODEBUG=pagetrace=/path/to/result. This feature is a GOEXPERIMENT due to a security risk with setuid binaries: this compels the Go runtime to write to some arbitrary file, which may be exploited. Flags.PreemptibleLoops bool Range enables range over int and func. RangeFunc enables range over func. RegabiArgs enables register arguments/results in all compiled Go functions. Requires wrappers (to do ABI translation), and reflect (so reflection calls use registers). RegabiWrappers enables ABI wrappers for calling between ABI0 and ABIInternal functions. Without this, the ABIs are assumed to be identical so cross-ABI calls are direct. Flags.StaticLockRanking bool All returns a list of all experiment settings. Disabled experiments appear in the list prefixed by "no". Enabled returns a list of enabled experiments, as lower-cased experiment names. String returns the canonical GOEXPERIMENT string to enable this experiment configuration. (Experiments in the same state as in the baseline are elided.) *ExperimentFlags : expvar.Var *ExperimentFlags : fmt.Stringer func ParseGOEXPERIMENT(goos, goarch, goexp string) (*ExperimentFlags, error) var Experiment
Package-Level Functions (total 4)
Check exits the program with a fatal error if Error is non-nil.
GOGOARCH returns the name and value of the GO$GOARCH setting. For example, if GOARCH is "amd64" it might return "GOAMD64", "v2".
ParseGOEXPERIMENT parses a (GOOS, GOARCH, GOEXPERIMENT) configuration tuple and returns the enabled and baseline experiment flag sets. TODO(mdempsky): Move to internal/goexperiment.
Package-Level Variables (total 16)
Error is one of the errors found (if any) in the build configuration.
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.
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 GOROOT string // cached for efficiency
Package-Level Constants (only one)
DefaultGOEXPERIMENT is the embedded default GOEXPERIMENT string. It is not guaranteed to be canonical.