]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/dist: record default GO_EXTLINK_ENABLED in Go
authorRuss Cox <rsc@golang.org>
Sat, 28 Feb 2015 03:50:01 +0000 (22:50 -0500)
committerRuss Cox <rsc@golang.org>
Sun, 1 Mar 2015 00:39:15 +0000 (00:39 +0000)
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/6333
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Minux Ma <minux@golang.org>
src/cmd/dist/buildruntime.go
src/cmd/internal/obj/util.go

index 317652476b90ff574eb78f3148c27aff838e196a..112326558a7a7b559984e5988b2fa015fa5839ec 100644 (file)
@@ -42,6 +42,7 @@ func mkzversion(dir, file string) {
 //     const defaultGOARM = <goarm>
 //     const defaultGOOS = <goos>
 //     const defaultGOARCH = <goarch>
+//     const defaultGO_EXTLINK_ENABLED = <goextlinkenabled>
 //     const version = <version>
 //     const goexperiment = <goexperiment>
 //
@@ -56,9 +57,10 @@ func mkzbootstrap(file string) {
                        "const defaultGOARM = `%s`\n"+
                        "const defaultGOOS = `%s`\n"+
                        "const defaultGOARCH = `%s`\n"+
+                       "const defaultGO_EXTLINK_ENABLED = `%s`\n"+
                        "const version = `%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)
 }
index 14f9b3655e0b8fd9ae01a7031a8a8d66217cefe2..a3c88a2b8a52528a0e5c7c537c12e3060cad7dc0 100644 (file)
@@ -231,6 +231,10 @@ func Getgo386() string {
        return envOr("GO386", defaultGO386)
 }
 
+func Getgoextlinkenabled() string {
+       return envOr("GO_EXTLINK_ENABLED", defaultGO_EXTLINK_ENABLED)
+}
+
 func Getgoversion() string {
        return version
 }