Documentation
¶
Index ¶
Constants ¶
View Source
const ( HardFloat = "hardfloat" SoftFloat = "softfloat" )
Variables ¶
View Source
var Arch = map[string][]string{
"aix": {"ppc64"},
"android": {"386", "amd64", "arm", "arm64"},
"darwin": {"amd64", "arm64"},
"dragonfly": {"amd64"},
"freebsd": {"386", "amd64", "arm", "arm64"},
"illumos": {"amd64"},
"js": {"wasm"},
"linux": {"386", "amd64", "arm", "arm64", "mips", "mips64", "mips64le", "mipsle", "ppc64", "ppc64le", "riscv64", "s390x"},
"netbsd": {"386", "amd64", "arm", "arm64"},
"openbsd": {"386", "amd64", "arm", "arm64", "mips64"},
"plan9": {"386", "amd64", "arm"},
"solaris": {"amd64"},
"windows": {"386", "amd64", "arm", "arm64"},
}
View Source
var ExtraArches = map[string][]ArchExtra{ "arm": { { EnvKey: "GOARM", Values: []ArchExtraValue{ {Value: "5", Name: "v5", ExtraFloat: HardFloat, IsDefault: true}, {Value: "6", Name: "v6", ExtraFloat: SoftFloat}, {Value: "7", Name: "v7", ExtraFloat: SoftFloat}, }, }, }, "386": { { EnvKey: "GO386", Values: []ArchExtraValue{ {Value: "sse2", IsDefault: true}, {Value: SoftFloat}, }, }, }, "amd64": { { EnvKey: "GOAMD64", Values: []ArchExtraValue{ {Value: "v1", IsDefault: true}, {Value: "v2"}, {Value: "v3"}, {Value: "v4"}, }, }, }, "wasm": { { EnvKey: "GOWASM", Values: []ArchExtraValue{ {Value: "", IsDefault: true}, {Value: "satconv"}, {Value: "signext"}, }, }, }, "mips": {_Mips}, "mipsle": {_Mips}, "mips64": {_Mips64}, "mips64le": {_Mips64}, "ppc64": {_Ppc64}, "ppc64le": {_Ppc64}, }
Functions ¶
func DownloadMod ¶ added in v1.1.9
Types ¶
type ArchExtra ¶ added in v1.2.1
type ArchExtra struct { EnvKey string Values []ArchExtraValue }
type ArchExtraValue ¶ added in v1.2.1
type ArchExtraValue struct { // IsDefault describes whether this extra arch is set by default. IsDefault bool ExtraFloat string // Name maybe empty string, use for replace value of Value in result file name Name string // Value value of env. Value string }
func (ArchExtraValue) Names ¶ added in v1.2.1
func (v ArchExtraValue) Names(showDefault bool) []string
func (ArchExtraValue) NamesExtraFloat ¶ added in v1.2.1
func (v ArchExtraValue) NamesExtraFloat(showDefault bool) []string
type BuildCommand ¶
type BuildCommand struct {
// contains filtered or unexported fields
}
func NewBuilder ¶
func NewBuilder(target string) BuildCommand
func (BuildCommand) Exec ¶
func (c BuildCommand) Exec() *exec.Cmd
func (BuildCommand) Ldflags ¶
func (c BuildCommand) Ldflags(value string) BuildCommand
func (BuildCommand) OutputName ¶
func (c BuildCommand) OutputName(name string) BuildCommand
func (BuildCommand) ProductionLdflags ¶
func (c BuildCommand) ProductionLdflags() BuildCommand
func (BuildCommand) Run ¶
func (c BuildCommand) Run() ([]byte, error)
func (BuildCommand) TrimPath ¶
func (c BuildCommand) TrimPath() BuildCommand
Click to show internal directories.
Click to hide internal directories.