From 9da8b5c786880e47f6f96b82be7c410af6f9011b Mon Sep 17 00:00:00 2001 From: Ayke Date: Sat, 5 Oct 2024 00:33:47 +0200 Subject: wasm: add `//go:wasmexport` support (#4451) This adds support for the `//go:wasmexport` pragma as proposed here: https://github.com/golang/go/issues/65199 It is currently implemented only for wasip1 and wasm-unknown, but it is certainly possible to extend it to other targets like GOOS=js and wasip2. --- main.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'main.go') diff --git a/main.go b/main.go index 6f257d1b2..fe8a3fb15 100644 --- a/main.go +++ b/main.go @@ -1500,6 +1500,7 @@ func main() { var tags buildutil.TagsFlag flag.Var(&tags, "tags", "a space-separated list of extra build tags") target := flag.String("target", "", "chip/board name or JSON target specification file") + buildMode := flag.String("buildmode", "", "build mode to use (default, c-shared)") var stackSize uint64 flag.Func("stack-size", "goroutine stack size (if unknown at compile time)", func(s string) error { size, err := bytesize.Parse(s) @@ -1608,6 +1609,7 @@ func main() { GOARM: goenv.Get("GOARM"), GOMIPS: goenv.Get("GOMIPS"), Target: *target, + BuildMode: *buildMode, StackSize: stackSize, Opt: *opt, GC: *gc, -- cgit v1.2.3