GOOS=js set -sENVIRONMENT=web,worker

This commit is contained in:
visualfc
2025-06-09 13:34:13 +08:00
parent dade77d719
commit 6fbc5c6fd0

View File

@@ -172,7 +172,7 @@ func Use(goos, goarch string, wasiThreads, changeRpath bool) (export Export, err
// "-Wl,--export=malloc", "-Wl,--export=free", // "-Wl,--export=malloc", "-Wl,--export=free",
} }
export.EXTRAFLAGS = []string{ export.EXTRAFLAGS = []string{
"-sENVIRONMENT=web", "-sENVIRONMENT=web,worker",
"-DPLATFORM_WEB", "-DPLATFORM_WEB",
"-sEXPORT_KEEPALIVE=1", "-sEXPORT_KEEPALIVE=1",
"-sEXPORT_ES6=1", "-sEXPORT_ES6=1",