Skip to content

tinygo 0.26.0 doesn't build docs example #3283

@juliaogris

Description

@juliaogris

After the upgrade from tiny go 0.25.0 to 0.26.0 and can't get the WASM example from the docs https://tinygo.org/docs/guides/webassembly/ to build anymore:

$ tinygo version
tinygo version 0.25.0 darwin/amd64 (using go version go1.19 and LLVM version 14.0.0)
$ tinygo build -o wasm.wasm -target wasm ./main.go # ✅

# upgrade....

$ tinygo version
tinygo version 0.26.0 darwin/amd64 (using go version go1.19.3 and LLVM version 14.0.0)
$ tinygo build -o wasm.wasm -target wasm ./main.go  # 💥
tinygo:wasm-ld: error: /var/folders/43/6hgjz_r92gv_c5mbtjx2fj5r0000gn/T/tinygo3399452899/main.o: undefined symbol: main.add
failed to run tool: wasm-ld
error: failed to link /var/folders/43/6hgjz_r92gv_c5mbtjx2fj5r0000gn/T/tinygo3399452899/main: exit status 1

This has also been reproduced on GitHub Actions:
successful build with 0.25.0 (go 1.19.3), failed build with 0.26.0 (go 1.19.3)
https://github.com/juliaogris/tinygo-test/actions

Screen Shot 2022-11-12 at 6 04 16 pm

Upgrade commit:
juliaogris/tinygo-test@64bea1d

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions