diff options
author | Ayke van Laethem <[email protected]> | 2022-09-14 13:07:27 +0200 |
---|---|---|
committer | Ayke van Laethem <[email protected]> | 2022-09-15 11:36:29 +0200 |
commit | 28a083633c23d5ac0703aa9e98f49a97ffe12652 (patch) | |
tree | ec9d0e83337b47dab686f530f2c36fc059cc0939 /builder/library.go | |
parent | 7e7814a0872c079d82d2f1837078e7eb5db06798 (diff) | |
download | tinygo-wasm-no-malloc.tar.gz tinygo-wasm-no-malloc.zip |
cgo: allow --export= in LDFLAGSwasm-no-malloc
This allows people to export some functions, such as malloc. Example:
// #cgo LDFLAGS: --export=malloc
import "C"
This exports the function malloc.
Note that this is somewhat unsafe right now, but it is used regardless.
By using this workaround, people have some time to transition away from
using malloc/free directly or until malloc is made safe to be used in
this way.
Diffstat (limited to 'builder/library.go')
0 files changed, 0 insertions, 0 deletions