cmd/dist: copy needed packages from standard library during bootstrap

This allows use of newer math/big (and later debug/pe)
without maintaining a vendored copy somewhere in cmd.

Use for math/big, deleting cmd/compile/internal/big.

Change-Id: I2bffa7a9ef115015be29fafdb02acc3e7a665d11
Reviewed-on: https://go-review.googlesource.com/31010
Reviewed-by: Minux Ma <minux@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Russ Cox 2016-10-13 15:13:41 -04:00
parent f444b48fe4
commit 15040c11b9
46 changed files with 80 additions and 15478 deletions

View file

@ -506,9 +506,7 @@ func formatReplace(in string, f func(i int, s string) string) string {
// blacklistedPackages is the set of packages which can
// be ignored.
var blacklistedPackages = map[string]bool{
"cmd/compile/internal/big": true,
}
var blacklistedPackages = map[string]bool{}
// blacklistedFunctions is the set of functions which may have
// format-like arguments but which don't do any formatting and
@ -537,7 +535,7 @@ func init() {
// To print out a new table, run: go test -run Formats -v.
var knownFormats = map[string]string{
"*bytes.Buffer %s": "",
"*cmd/compile/internal/big.Int %#x": "",
"*math/big.Int %#x": "",
"*cmd/compile/internal/gc.Bits %v": "",
"*cmd/compile/internal/gc.Field %p": "",
"*cmd/compile/internal/gc.Field %v": "",