1
0
mirror of https://github.com/golang/go synced 2024-11-17 21:14:44 -07:00

cmd/dist: write and use a go.mod file in the bootstrap directory

Updates #30228

Change-Id: Ica28525b31a8a787875c147e16274eba8f4dbffc
Reviewed-on: https://go-review.googlesource.com/c/go/+/167078
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
This commit is contained in:
Bryan C. Mills 2019-03-12 00:26:24 -04:00
parent 6c527aa583
commit 781da44091

View File

@ -131,6 +131,7 @@ func bootstrapBuildTools() {
xmkdirall(base)
// Copy source code into $GOROOT/pkg/bootstrap and rewrite import paths.
writefile("module bootstrap\n", pathf("%s/%s", base, "go.mod"), 0)
for _, dir := range bootstrapDirs {
src := pathf("%s/src/%s", goroot, dir)
dst := pathf("%s/%s", base, dir)
@ -204,7 +205,7 @@ func bootstrapBuildTools() {
cmd = append(cmd, "-toolexec="+tool)
}
cmd = append(cmd, "bootstrap/cmd/...")
run(workspace, ShowOutput|CheckExit, cmd...)
run(base, ShowOutput|CheckExit, cmd...)
// Copy binaries into tool binary directory.
for _, name := range bootstrapDirs {