]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/dist: skip building tools for js/wasm
authorAgniva De Sarker <agnivade@yahoo.co.in>
Sat, 23 Jun 2018 05:55:31 +0000 (11:25 +0530)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 3 Jul 2018 17:37:40 +0000 (17:37 +0000)
Fixes #25911

Change-Id: Id3b5ea5494544e9e7f889831cefaf080cae8865d
Reviewed-on: https://go-review.googlesource.com/120655
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/cmd/dist/build.go

index 616e76dfe7fc45da4622e0c17fb5405343f7999c..2fdc4d3143cebcec4f5ac3b4f2d8c9b7d533f162 100644 (file)
@@ -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))