tinygo icon indicating copy to clipboard operation
tinygo copied to clipboard

tinygo build -gc none fails

Open pierrec opened this issue 1 year ago • 2 comments

tinygo version 0.31.2 darwin/amd64 (using go version go1.22.3 and LLVM version 17.0.1)

tinygo build -gc none
ld.lld: error: undefined symbol: _runtime.alloc
>>> referenced by task_stack.go:75 (/usr/local/Cellar/tinygo/0.31.2/src/internal/task/task_stack.go:75)
>>>               /tmp/lto.tmp:(symbol _internal/task.start+0x19)
>>> referenced by task_stack.go:113 (/usr/local/Cellar/tinygo/0.31.2/src/internal/task/task_stack.go:113)
>>>               /tmp/lto.tmp:(symbol _internal/task.start+0xa)
failed to run tool: ld.lld
error: failed to link /var/folders/lb/nhsppbxs5_v27pn_x3kf66wc0000gn/T/tinygo1324987751/main: exit status 1

Note it works fine if used in combination of -scheduler none

pierrec avatar May 26 '24 20:05 pierrec

If you need a minimal garbage collector try -gc=leaking.

dgryski avatar May 31 '24 18:05 dgryski

This is the intended behavior. And one more reason why we should probably just remove this option.

aykevl avatar Jun 10 '24 13:06 aykevl