diff options
author | Ayke <[email protected]> | 2024-10-05 00:33:47 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2024-10-04 15:33:47 -0700 |
commit | 9da8b5c786880e47f6f96b82be7c410af6f9011b (patch) | |
tree | 47bf837bbda8f5e174447b165f8bb4ad8d7f523e /main.go | |
parent | 407889864f1749fee46312fa191bf53ff59137ce (diff) | |
download | tinygo-9da8b5c786880e47f6f96b82be7c410af6f9011b.tar.gz tinygo-9da8b5c786880e47f6f96b82be7c410af6f9011b.zip |
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.
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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, |