Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wasm32-unknown-unknown: Fix undefined malloc/free/calloc symbols (#275)
As discussed in #250, in some cases the definitions of `malloc`, `free`, and `calloc` are used but don't get linked in, leading to undefined symbols (i.e. reference to the symbol in "env"). I was not able to determine exactly why this is happening, but it seems to be related to `malloc`, `calloc`, and `free` being defined as inline functions. When building in debug mode there are undefined symbols; when building in release mode there are not, presumably because the functions are inlined. Switching to macros avoids issues of inlining and fixes this issue for me.
- Loading branch information