1
0
mirror of https://github.com/golang/go synced 2024-11-08 01:36:12 -07:00
go/src/cmd/dist
Dominik Honnef fdba5a7544 all: delete dead non-test code
This change removes a lot of dead code. Some of the code has never been
used, not even when it was first commited. The rest shouldn't have
survived refactors.

This change doesn't remove unused routines helpful for debugging, nor
does it remove code that's used in commented out blocks of code that are
only unused temporarily. Furthermore, unused constants weren't removed
when they were part of a set of constants from specifications.

One noteworthy omission from this CL are about 1000 lines of unused code
in cmd/fix, 700 lines of which are the typechecker, which hasn't been
used ever since the pre-Go 1 fixes have been removed. I wasn't sure if
this code should stick around for future uses of cmd/fix or be culled as
well.

Change-Id: Ib714bc7e487edc11ad23ba1c3222d1fd02e4a549
Reviewed-on: https://go-review.googlesource.com/20926
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-03-25 06:28:13 +00:00
..
build.go cmd/dist: add "s390x" to okgoarch and cgoEnabled 2016-03-21 07:31:00 +00:00
buildgo.go all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
buildruntime.go all: single space after period. 2016-03-02 00:13:47 +00:00
buildtool.go cmd/dist: build bootstrap toolchain with -l 2016-03-14 21:30:33 +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 dwbug/elf: support old-style compressed DWARF 2015-12-03 20:53:04 +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
README
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 misc/cgo/testcarchive: fix build 2016-03-25 00:55:07 +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
util.go all: delete dead non-test code 2016-03-25 06:28:13 +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

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.