mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/go, cmd/dist: introduce GOMIPS environment variable
GOMIPS is a GOARCH=mips{,le} specific option, for a choice between
hard-float and soft-float. Valid values are 'hardfloat' (default) and
'softfloat'. It is passed to the assembler as
'GOMIPS_{hardfloat,softfloat}'.
Note: GOMIPS will later also be used for a choice of MIPS instruction
set (mips32/mips32r2).
Updates #18162
Change-Id: I35417db8625695f09d6ccc3042431dd2eaa756a6
Reviewed-on: https://go-review.googlesource.com/37954
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
parent
4f5018594d
commit
12abacb555
9 changed files with 51 additions and 2 deletions
|
|
@ -24,6 +24,7 @@ var (
|
|||
GOOS = envOr("GOOS", defaultGOOS)
|
||||
GO386 = envOr("GO386", defaultGO386)
|
||||
GOARM = goarm()
|
||||
GOMIPS = gomips()
|
||||
Version = version
|
||||
)
|
||||
|
||||
|
|
@ -41,6 +42,15 @@ func goarm() int {
|
|||
panic("unreachable")
|
||||
}
|
||||
|
||||
func gomips() string {
|
||||
switch v := envOr("GOMIPS", defaultGOMIPS); v {
|
||||
case "hardfloat", "softfloat":
|
||||
return v
|
||||
}
|
||||
log.Fatalf("Invalid GOMIPS value. Must be hardfloat or softfloat.")
|
||||
panic("unreachable")
|
||||
}
|
||||
|
||||
func Getgoextlinkenabled() string {
|
||||
return envOr("GO_EXTLINK_ENABLED", defaultGO_EXTLINK_ENABLED)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue