aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/syscall
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2023-08-10 22:36:35 +0200
committerRon Evans <[email protected]>2023-08-17 18:16:54 +0200
commita545f17d2ea55807de4b97cf4f52f01d5d4f1815 (patch)
tree075ea83380859d7604f67ca4dbaafc7ff76f4e90 /src/syscall
parentf4375d045213c416fad2d19773e7700b6b02f685 (diff)
downloadtinygo-a545f17d2ea55807de4b97cf4f52f01d5d4f1815.tar.gz
tinygo-a545f17d2ea55807de4b97cf4f52f01d5d4f1815.zip
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.
Diffstat (limited to 'src/syscall')
-rw-r--r--src/syscall/errno_other.go2
-rw-r--r--src/syscall/file_emulated.go2
-rw-r--r--src/syscall/file_hosted.go2
-rw-r--r--src/syscall/proc_emulated.go2
-rw-r--r--src/syscall/proc_hosted.go2
-rw-r--r--src/syscall/syscall_libc.go2
-rw-r--r--src/syscall/syscall_libc_wasi.go2
7 files changed, 7 insertions, 7 deletions
diff --git a/src/syscall/errno_other.go b/src/syscall/errno_other.go
index 19822a1c6..a00109652 100644
--- a/src/syscall/errno_other.go
+++ b/src/syscall/errno_other.go
@@ -1,4 +1,4 @@
-//go:build !wasi && !darwin
+//go:build !wasi && !wasip1 && !darwin
package syscall
diff --git a/src/syscall/file_emulated.go b/src/syscall/file_emulated.go
index f12d74e58..5ed57f13b 100644
--- a/src/syscall/file_emulated.go
+++ b/src/syscall/file_emulated.go
@@ -1,4 +1,4 @@
-//go:build baremetal || wasm
+//go:build baremetal || (wasm && !wasip1)
// This file emulates some file-related functions that are only available
// under a real operating system.
diff --git a/src/syscall/file_hosted.go b/src/syscall/file_hosted.go
index 553322f02..d9198a779 100644
--- a/src/syscall/file_hosted.go
+++ b/src/syscall/file_hosted.go
@@ -1,4 +1,4 @@
-//go:build !baremetal && !wasm
+//go:build !(baremetal || (wasm && !wasip1))
// This file assumes there is a libc available that runs on a real operating
// system.
diff --git a/src/syscall/proc_emulated.go b/src/syscall/proc_emulated.go
index 46570f530..d8e7ff7a9 100644
--- a/src/syscall/proc_emulated.go
+++ b/src/syscall/proc_emulated.go
@@ -1,4 +1,4 @@
-//go:build baremetal || wasi || wasm
+//go:build baremetal || tinygo.wasm
// This file emulates some process-related functions that are only available
// under a real operating system.
diff --git a/src/syscall/proc_hosted.go b/src/syscall/proc_hosted.go
index ab35762d0..05c509e6f 100644
--- a/src/syscall/proc_hosted.go
+++ b/src/syscall/proc_hosted.go
@@ -1,4 +1,4 @@
-//go:build !baremetal && !wasi && !wasm
+//go:build !baremetal && !tinygo.wasm
// This file assumes there is a libc available that runs on a real operating
// system.
diff --git a/src/syscall/syscall_libc.go b/src/syscall/syscall_libc.go
index ea0a000d1..7a13245b6 100644
--- a/src/syscall/syscall_libc.go
+++ b/src/syscall/syscall_libc.go
@@ -1,4 +1,4 @@
-//go:build darwin || nintendoswitch || wasi
+//go:build darwin || nintendoswitch || wasi || wasip1
package syscall
diff --git a/src/syscall/syscall_libc_wasi.go b/src/syscall/syscall_libc_wasi.go
index a3bd3a487..5e6a231df 100644
--- a/src/syscall/syscall_libc_wasi.go
+++ b/src/syscall/syscall_libc_wasi.go
@@ -1,4 +1,4 @@
-//go:build wasi
+//go:build wasi || wasip1
package syscall