mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-04 02:57:46 +00:00
wasm: add support for GOOS=wasip1
This adds true GOOS=wasip1 support in addition to our existing -target=wasi support. The old support for WASI isn't removed, but should be treated as deprecated and will likely be removed eventually to reduce the test burden.
This commit is contained in:
committed by
Ron Evans
parent
f4375d0452
commit
a545f17d2e
+1
-1
@@ -1,4 +1,4 @@
|
||||
//go:build linux || darwin || windows
|
||||
//go:build linux || darwin || windows || wasip1
|
||||
|
||||
package runtime
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//go:build linux || darwin
|
||||
//go:build linux || darwin || wasip1
|
||||
|
||||
package runtime
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
//go:build wasip1
|
||||
|
||||
package runtime
|
||||
|
||||
// The actual GOOS=wasip1, as newly added in the Go 1.21 toolchain.
|
||||
// Previously we supported -target=wasi, but that was essentially faked by using
|
||||
// linux/arm instead because that was the closest thing that was already
|
||||
// supported in the Go standard library.
|
||||
|
||||
const GOOS = "wasip1"
|
||||
@@ -1,4 +1,4 @@
|
||||
//go:build wasm && !wasi
|
||||
//go:build wasm && !wasi && !wasip1
|
||||
|
||||
package runtime
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//go:build wasm && !wasi && !scheduler.none
|
||||
//go:build wasm && !wasi && !scheduler.none && !wasip1
|
||||
|
||||
package runtime
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//go:build tinygo.wasm && wasi
|
||||
//go:build tinygo.wasm && (wasi || wasip1)
|
||||
|
||||
package runtime
|
||||
|
||||
|
||||
Reference in New Issue
Block a user