Skip to content

Commit 5d4f047

Browse files
agnivadebradfitz
authored andcommitted
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 <[email protected]> Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1 parent aad71d3 commit 5d4f047

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/cmd/dist/build.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,9 +1302,14 @@ func cmdbootstrap() {
13021302
os.Setenv("CC", compilerEnvLookup(defaultcc, goos, goarch))
13031303
xprintf("Building packages and commands for target, %s/%s.\n", goos, goarch)
13041304
}
1305-
goInstall(goBootstrap, "std", "cmd")
1306-
checkNotStale(goBootstrap, "std", "cmd")
1307-
checkNotStale(cmdGo, "std", "cmd")
1305+
targets := []string{"std", "cmd"}
1306+
if goos == "js" && goarch == "wasm" {
1307+
// Skip the cmd tools for js/wasm. They're not usable.
1308+
targets = targets[:1]
1309+
}
1310+
goInstall(goBootstrap, targets...)
1311+
checkNotStale(goBootstrap, targets...)
1312+
checkNotStale(cmdGo, targets...)
13081313
if debug {
13091314
run("", ShowOutput|CheckExit, pathf("%s/compile", tooldir), "-V=full")
13101315
run("", ShowOutput|CheckExit, pathf("%s/buildid", tooldir), pathf("%s/pkg/%s_%s/runtime/internal/sys.a", goroot, goos, goarch))

0 commit comments

Comments
 (0)