Skip to content

Commit

Permalink
cmd/dist: skip building std for the host when cross-compiling
Browse files Browse the repository at this point in the history
The purpose of building the host toolchain is so that we can use it to
build and test the target configuration.

The host configuration should already be tested separately (with its
own builder), so we do not need to build the parts of that
configuration that are not relevant to the task of building and
testing the target configuration.

Updates golang#47257.

Change-Id: I814778d2d65b1f2887c9419232b5bfd4068f58af
Reviewed-on: https://go-review.googlesource.com/c/go/+/461676
Run-TryBot: Bryan Mills <[email protected]>
Auto-Submit: Bryan Mills <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Reviewed-by: Austin Clements <[email protected]>
  • Loading branch information
Bryan C. Mills authored and johanbrandhorst committed Feb 12, 2023
1 parent da09a80 commit ba1ba8a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/cmd/dist/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -1471,12 +1471,9 @@ func cmdbootstrap() {
if vflag > 0 {
xprintf("\n")
}
xprintf("Building packages and commands for host, %s/%s.\n", goos, goarch)
goInstall(nil, goBootstrap, "std")
xprintf("Building commands for host, %s/%s.\n", goos, goarch)
goInstall(toolenv, goBootstrap, "cmd")
checkNotStale(nil, goBootstrap, "std")
checkNotStale(toolenv, goBootstrap, "cmd")
checkNotStale(nil, gorootBinGo, "std")
checkNotStale(toolenv, gorootBinGo, "cmd")

timelog("build", "target toolchain")
Expand Down

0 comments on commit ba1ba8a

Please sign in to comment.