1
0
mirror of https://github.com/golang/go synced 2024-11-08 01:26:11 -07:00
go/src/cmd/dist
Bryan C. Mills 39d4693bac misc/cgo/testsanitizers: convert test.bash to Go
This makes it much easier to run individual failing subtests.

Use $(go env CC) instead of always defaulting to clang; this makes it
easier to test with other compilers.

Run C binaries to detect incompatible compiler/kernel pairings instead
of sniffing versions.

updates #21196

Change-Id: I0debb3cc4a4244df44b825157ffdc97b5c09338d
Reviewed-on: https://go-review.googlesource.com/52910
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-08-17 15:05:08 +00:00
..
build.go cmd/dist: ensure android-implies-linux for file names in dist 2017-05-24 03:09:15 +00:00
buildgo.go cmd/dist: move cmd/go z files to cmd/go/internal/cfg 2017-02-03 20:30:52 +00:00
buildruntime.go cmd/internal/objabi: extract shared functionality from obj 2017-04-19 00:00:09 +00:00
buildtool.go cmd/internal/objabi: extract shared functionality from obj 2017-04-19 00:00:09 +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_test.go cmd/dist: add test that deps.go is up to date 2017-08-17 00:46:47 +00:00
deps.go cmd/dist: update deps.go for current dependencies 2017-08-16 21:56:47 +00:00
doc.go cmd/dist: add doc file to fix go doc dist 2017-08-11 18:00:53 +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: add test that deps.go is up to date 2017-08-17 00:46:47 +00:00
README build: require old Go to build new Go (and convert cmd/dist to Go) 2015-01-10 19:16:00 +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_linux.go cmd/go: ensure streaming test's stdout, stderr are same as cmd/go's 2016-12-07 01:12:22 +00:00
test.go misc/cgo/testsanitizers: convert test.bash to Go 2017-08-17 15:05:08 +00:00
util_gc.go cmd/dist: add -check-armv6k command to check for ARMv6K 2016-12-01 07:17:38 +00:00
util_gccgo.go cmd/dist: add -check-armv6k command to check for ARMv6K 2016-12-01 07:17:38 +00:00
util.go cmd/dist: add -check-armv6k command to check for ARMv6K 2016-12-01 07:17:38 +00:00
vfp_arm.s cmd/dist: add -check-armv6k command to check for ARMv6K 2016-12-01 07:17:38 +00:00
vfp_default.s cmd/dist: add -check-armv6k command to check for ARMv6K 2016-12-01 07:17:38 +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.