Commit 781da440 authored by Bryan C. Mills's avatar Bryan C. Mills

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: default avatarJay Conrod <jayconrod@google.com>
parent 6c527aa5
......@@ -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 {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment