wasix-org/wasix-libc

Missing functions when compiling rust code

Closed this issue · 0 comments

I have observed that, when compiling rust code, if any of the underlying wasix-libc source uses __eqtf2, this will result in an imported function in the resulting wasm module called env.__eqtf2. __eqtf2 appears to be an internal LLVM function. This behaviour was observed when core_handler is included when compiling rust code. core_handler calls fprintf, which eventually calls printf_core, the body for which includes calls to __eqtf2. Note that the same code works when compiling C sources with clang.

The following functions, as found by @john-sharratt, can likely cause the same problem:

__divtf3
__eqtf2
__extenddftf2
__extendsftf2
__fixtfdi
__fixtfsi
__fixunstfsi
__floatsitf
__floatunsitf
__getf2
__gttf2
__letf2
__lttf2
__netf2
__subtf3
__trunctfdf2
__trunctfsf2
__unordtf2