go/src/cmd/dist
David Crawshaw fd296282e0 cmd/dist: enable plugin test on darwin/amd64
Change-Id: I6071881a5f7b9638bca0bfef76d6f4f45c9202a6
Reviewed-on: https://go-review.googlesource.com/29396
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-09-24 00:24:28 +00:00
..
README
build.go cmd/dist: use "set" instead of "export" in diagnostic message 2016-06-07 04:31:29 +00:00
buildgo.go cmd/dist: make zosarch.go deterministic 2016-06-16 19:32:33 +00:00
buildruntime.go all: single space after period. 2016-03-02 00:13:47 +00:00
buildtool.go cmd/dist: build cmd/compile/internal/syntax 2016-08-18 21:33:53 +00:00
cpuid_386.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
cpuid_amd64.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
cpuid_default.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
deps.go os/exec: add Cmd.RunContext and Cmd.WaitContext 2016-04-28 19:06:41 +00:00
main.go all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
mkdeps.bash cmd/dist: rewrite mkdeps.bash to work on OS X 2015-11-19 20:53:50 +00:00
sys_default.go all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
sys_windows.go all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
test.go cmd/dist: enable plugin test on darwin/amd64 2016-09-24 00:24:28 +00:00
util.go cmd/dist: remove the use of debug/elf package 2016-05-04 21:23:20 +00:00
util_gc.go all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
util_gccgo.go all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
vfp_arm.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
vfp_default.s all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00

README

This program, dist, is the bootstrapping tool for the Go distribution.

As of Go 1.5, dist and other parts of the compiler toolchain are written
in Go, making bootstrapping a little more involved than in the past.
The approach is to build the current release of Go with an earlier one.

The process to install Go 1.x, for x ≥ 5, is:

1. Build cmd/dist with Go 1.4.
2. Using dist, build Go 1.x compiler toolchain with Go 1.4.
3. Using dist, rebuild Go 1.x compiler toolchain with itself.
4. Using dist, build Go 1.x cmd/go (as go_bootstrap) with Go 1.x compiler toolchain.
5. Using go_bootstrap, build the remaining Go 1.x standard library and commands.

NOTE: During the transition from the old C-based toolchain to the Go-based one,
step 2 also builds the parts of the toolchain written in C, and step 3 does not
recompile those.

Because of backward compatibility, although the steps above say Go 1.4,
in practice any release ≥ Go 1.4 but < Go 1.x will work as the bootstrap base.

See golang.org/s/go15bootstrap for more details.

Compared to Go 1.4 and earlier, dist will also take over much of what used to
be done by make.bash/make.bat/make.rc and all of what used to be done by
run.bash/run.bat/run.rc, because it is nicer to implement that logic in Go
than in three different scripting languages simultaneously.