aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/dist
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2021-10-05 21:58:30 +0000
committerMatthew Dempsky <mdempsky@google.com>2021-10-05 22:42:11 +0000
commit96fface83ad69b6d6ad8059d61d232737572e85d (patch)
tree73804195f4b26054448e12ff5b5d598965118c6d /src/cmd/dist
parent6ae3afa7e784aadea23793b0527bd8880e002d2f (diff)
downloadgo-96fface83ad69b6d6ad8059d61d232737572e85d.tar.gz
go-96fface83ad69b6d6ad8059d61d232737572e85d.zip
Revert "cmd/dist: omit cmd/cgo from toolchain1"
This reverts commit 81b7ec1ad5b50b8e73a63b44d8c2538154def535. Reason for revert: broke ios builder Change-Id: I7f469161c3c632ae48b7d938d355c9929eaaad92 Reviewed-on: https://go-review.googlesource.com/c/go/+/354135 Trust: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'src/cmd/dist')
-rw-r--r--src/cmd/dist/build.go2
-rw-r--r--src/cmd/dist/buildtool.go8
2 files changed, 8 insertions, 2 deletions
diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go
index dca5464e56..39f016e315 100644
--- a/src/cmd/dist/build.go
+++ b/src/cmd/dist/build.go
@@ -1359,7 +1359,7 @@ func cmdbootstrap() {
}
// To recap, so far we have built the new toolchain
- // (cmd/asm, cmd/compile, cmd/link)
+ // (cmd/asm, cmd/cgo, cmd/compile, cmd/link)
// using Go 1.4's toolchain and go command.
// Then we built the new go command (as go_bootstrap)
// using the new toolchain and our own build logic (above).
diff --git a/src/cmd/dist/buildtool.go b/src/cmd/dist/buildtool.go
index 8d1c914f30..320c62f850 100644
--- a/src/cmd/dist/buildtool.go
+++ b/src/cmd/dist/buildtool.go
@@ -33,6 +33,7 @@ import (
var bootstrapDirs = []string{
"cmd/asm",
"cmd/asm/internal/...",
+ "cmd/cgo",
"cmd/compile",
"cmd/compile/internal/...",
"cmd/internal/archive",
@@ -101,7 +102,6 @@ func bootstrapBuildTools() {
mkbuildcfg(pathf("%s/src/internal/buildcfg/zbootstrap.go", goroot))
mkobjabi(pathf("%s/src/cmd/internal/objabi/zbootstrap.go", goroot))
- mkzdefaultcc("", pathf("%s/src/cmd/cgo/zdefaultcc.go", goroot))
// Use $GOROOT/pkg/bootstrap as the bootstrap workspace root.
// We use a subdirectory of $GOROOT/pkg because that's the
@@ -134,6 +134,12 @@ func bootstrapBuildTools() {
}
xmkdirall(dst)
+ if path == "cmd/cgo" {
+ // Write to src because we need the file both for bootstrap
+ // and for later in the main build.
+ mkzdefaultcc("", pathf("%s/zdefaultcc.go", src))
+ mkzdefaultcc("", pathf("%s/zdefaultcc.go", dst))
+ }
return nil
}