wasm/js: use standard library syscall package

This switches -target=wasm (browser wasm) over from our own syscall
package to the one used in the Go standard library.

While this doesn't remove any code (so we can't simplify anything), the
idea is that this improves compatibility with existing code a bit more.
So It's a similar reasoning as for
https://github.com/tinygo-org/tinygo/pull/4417.
This commit is contained in:
Ayke van Laethem
2024-09-11 12:16:53 +02:00
parent b5626e70cb
commit 67b45dd14d
6 changed files with 7 additions and 6 deletions
+1 -1
View File
@@ -218,7 +218,7 @@ func listGorootMergeLinks(goroot, tinygoroot string, overrides map[string]bool)
// with the TinyGo version. This is the case on some targets.
func needsSyscallPackage(buildTags []string) bool {
for _, tag := range buildTags {
if tag == "baremetal" || tag == "nintendoswitch" || tag == "tinygo.wasm" {
if tag == "baremetal" || tag == "nintendoswitch" || tag == "wasip1" || tag == "wasip2" || tag == "wasm_unknown" {
return true
}
}