diff options
Diffstat (limited to 'src/cmd/dist/buildruntime.go')
| -rw-r--r-- | src/cmd/dist/buildruntime.go | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/cmd/dist/buildruntime.go b/src/cmd/dist/buildruntime.go index 1e6ae82397..5e2605966b 100644 --- a/src/cmd/dist/buildruntime.go +++ b/src/cmd/dist/buildruntime.go @@ -45,3 +45,31 @@ func mkzexperiment(dir, file string) { writefile(out, file, 0) } + +// mkzbootstrap writes cmd/internal/obj/zbootstrap.go: +// +// package obj +// +// const defaultGOROOT = <goroot> +// const defaultGOARM = <goarm> +// const defaultGOOS = <goos> +// const defaultGOARCH = <goarch> +// const version = <version> +// const goexperiment = <goexperiment> +// +func mkzbootstrap(file string) { + out := fmt.Sprintf( + "// auto generated by go tool dist\n"+ + "\n"+ + "package obj\n"+ + "\n"+ + "const defaultGOROOT = `%s`\n"+ + "const defaultGOARM = `%s`\n"+ + "const defaultGOOS = `%s`\n"+ + "const defaultGOARCH = `%s`\n"+ + "const version = `%s`\n"+ + "const goexperiment = `%s`\n", + goroot_final, goarm, gohostos, gohostarch, goversion, os.Getenv("GOEXPERIMENT")) + + writefile(out, file, 0) +} |
