Skip to content

Commit

Permalink
syscall: use wasi-libc tables for wasm/js target
Browse files Browse the repository at this point in the history
Instead of using fake tables for errno and others, use the ones that
correspond to wasi-libc.
  • Loading branch information
aykevl committed Nov 6, 2024
1 parent 51e078c commit c0d873b
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/syscall/env_libc.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build nintendoswitch || wasip1
//go:build js || nintendoswitch || wasip1

package syscall

Expand Down
2 changes: 1 addition & 1 deletion src/syscall/errno_other.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build !wasip1 && !wasip2
//go:build !js && !wasip1 && !wasip2

package syscall

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build wasip1
//go:build wasip1 || js

package syscall

Expand Down
2 changes: 1 addition & 1 deletion src/syscall/syscall_libc.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build nintendoswitch || wasip1 || wasip2
//go:build js || nintendoswitch || wasip1 || wasip2

package syscall

Expand Down
4 changes: 3 additions & 1 deletion src/syscall/syscall_libc_wasi.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
//go:build wasip1 || wasip2
//go:build js || wasip1 || wasip2

// Note: also including js in here because it also uses wasi-libc.

package syscall

Expand Down
2 changes: 1 addition & 1 deletion src/syscall/syscall_nonhosted.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build baremetal || js || wasm_unknown
//go:build baremetal || wasm_unknown

package syscall

Expand Down
2 changes: 1 addition & 1 deletion src/syscall/tables_nonhosted.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 baremetal || nintendoswitch || js || wasm_unknown
//go:build baremetal || nintendoswitch || wasm_unknown

package syscall

Expand Down

0 comments on commit c0d873b

Please sign in to comment.