]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: stub out gotoolchain.go for wasip1 os build tag
authorMichael Matloob <matloob@golang.org>
Tue, 18 Apr 2023 15:20:58 +0000 (11:20 -0400)
committerMichael Matloob <matloob@golang.org>
Tue, 18 Apr 2023 16:04:10 +0000 (16:04 +0000)
There's a stub for gotoolchain.go for the js build tag because js/wasm
doesn't define syscall.Exec. But there are builders that are wasm but
not js, which also don't have syscall.Exec. The wasip1 GOOS is one
example. Stub out gotoolchain.go for wasip1 also.

Change-Id: I224bb385474ad9c5d3c28a83a000f450dfb43c0d
Reviewed-on: https://go-review.googlesource.com/c/go/+/485735
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
Run-TryBot: Michael Matloob <matloob@golang.org>

src/cmd/go/gotoolchain.go
src/cmd/go/gotoolchain_stub.go [moved from src/cmd/go/gotoolchain_js.go with 91% similarity]

index 5b7468f21fd29198586dae665ac86859dee36de9..1552d08ef3518ddaf3babb5114c622cea58c9669 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build !js
+//go:build !js && !wasip1
 
 package main
 
similarity index 91%
rename from src/cmd/go/gotoolchain_js.go
rename to src/cmd/go/gotoolchain_stub.go
index 0042ef30c888d7522f46191b95cf9648cb9de03b..9d1d7dbd463b1fcf3662bdff9b666cb78ad8023f 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build js
+//go:build js || wasip1
 
 package main