Skip to content

Make js library functions compatible with LEGALIZE_JS_FFI=0 #7679

@kripken

Description

@kripken

The LEGALIZE_JS_FFI flag can't be used in many cases, e.g.

./emcc tests/hello_libcxx.cpp -s MAIN_MODULE=1 -s LEGALIZE_JS_FFI=0

crashes. The reason is that e.g. for rintf we emit f32 calls in the backend, since we are not legalizing. But the js library implementation for rintf has hardcoded doubles in src/library.js. So we end up with the wrong type. That method and others would need to be ifdefed for the non-legalizing case, or we could implement them in C.

cc @awtcode

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions