Commit 79341998 authored by Russ Cox's avatar Russ Cox

cmd/dist: record default GO_EXTLINK_ENABLED in Go

Today it's only recorded for C, but the Go version of the linker will need it.

Change-Id: I0de56d98e8f3f1b7feb830458c0934af367fd29a
Reviewed-on: https://go-review.googlesource.com/6333Reviewed-by: default avatarRob Pike <r@golang.org>
Reviewed-by: default avatarMinux Ma <minux@golang.org>
parent d7b10060
...@@ -42,6 +42,7 @@ func mkzversion(dir, file string) { ...@@ -42,6 +42,7 @@ func mkzversion(dir, file string) {
// const defaultGOARM = <goarm> // const defaultGOARM = <goarm>
// const defaultGOOS = <goos> // const defaultGOOS = <goos>
// const defaultGOARCH = <goarch> // const defaultGOARCH = <goarch>
// const defaultGO_EXTLINK_ENABLED = <goextlinkenabled>
// const version = <version> // const version = <version>
// const goexperiment = <goexperiment> // const goexperiment = <goexperiment>
// //
...@@ -56,9 +57,10 @@ func mkzbootstrap(file string) { ...@@ -56,9 +57,10 @@ func mkzbootstrap(file string) {
"const defaultGOARM = `%s`\n"+ "const defaultGOARM = `%s`\n"+
"const defaultGOOS = `%s`\n"+ "const defaultGOOS = `%s`\n"+
"const defaultGOARCH = `%s`\n"+ "const defaultGOARCH = `%s`\n"+
"const defaultGO_EXTLINK_ENABLED = `%s`\n"+
"const version = `%s`\n"+ "const version = `%s`\n"+
"const goexperiment = `%s`\n", "const goexperiment = `%s`\n",
goroot_final, go386, goarm, gohostos, gohostarch, findgoversion(), os.Getenv("GOEXPERIMENT")) goroot_final, go386, goarm, gohostos, gohostarch, goextlinkenabled, findgoversion(), os.Getenv("GOEXPERIMENT"))
writefile(out, file, 0) writefile(out, file, 0)
} }
...@@ -231,6 +231,10 @@ func Getgo386() string { ...@@ -231,6 +231,10 @@ func Getgo386() string {
return envOr("GO386", defaultGO386) return envOr("GO386", defaultGO386)
} }
func Getgoextlinkenabled() string {
return envOr("GO_EXTLINK_ENABLED", defaultGO_EXTLINK_ENABLED)
}
func Getgoversion() string { func Getgoversion() string {
return version return version
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment