From 5d4f0474ecb322135612813eadf22db78309b33f Mon Sep 17 00:00:00 2001 From: Agniva De Sarker Date: Sat, 23 Jun 2018 11:25:31 +0530 Subject: [PATCH] cmd/dist: skip building tools for js/wasm Fixes #25911 Change-Id: Id3b5ea5494544e9e7f889831cefaf080cae8865d Reviewed-on: https://go-review.googlesource.com/120655 Reviewed-by: Brad Fitzpatrick Run-TryBot: Brad Fitzpatrick TryBot-Result: Gobot Gobot --- src/cmd/dist/build.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go index 616e76dfe7..2fdc4d3143 100644 --- a/src/cmd/dist/build.go +++ b/src/cmd/dist/build.go @@ -1302,9 +1302,14 @@ func cmdbootstrap() { os.Setenv("CC", compilerEnvLookup(defaultcc, goos, goarch)) xprintf("Building packages and commands for target, %s/%s.\n", goos, goarch) } - goInstall(goBootstrap, "std", "cmd") - checkNotStale(goBootstrap, "std", "cmd") - checkNotStale(cmdGo, "std", "cmd") + targets := []string{"std", "cmd"} + if goos == "js" && goarch == "wasm" { + // Skip the cmd tools for js/wasm. They're not usable. + targets = targets[:1] + } + goInstall(goBootstrap, targets...) + checkNotStale(goBootstrap, targets...) + checkNotStale(cmdGo, targets...) if debug { run("", ShowOutput|CheckExit, pathf("%s/compile", tooldir), "-V=full") run("", ShowOutput|CheckExit, pathf("%s/buildid", tooldir), pathf("%s/pkg/%s_%s/runtime/internal/sys.a", goroot, goos, goarch)) -- 2.50.0