Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

working around dyncall issues #8

Closed
ricomariani opened this issue May 11, 2021 · 2 comments
Closed

working around dyncall issues #8

ricomariani opened this issue May 11, 2021 · 2 comments

Comments

@ricomariani
Copy link

@ricomariani ricomariani commented May 11, 2021

I ran into this issue:

https://github.com/emscripten-core/emscripten/pull/13883/commits

I was able to workaround with some minor changes in the Makefile:

dist/wa-sqlite.mjs: $(BITCODE_FILES) $(LIBRARY_FILES) $(EXPORTED_FUNCTIONS) $(EXTRA_EXPORTED_RUNTIME_METHODS)
        mkdir -p dist
        EMCC_CLOSURE_ARGS="--externs my_externs.js" $(EMCC) $(EMFLAGS) $(EMFLAGS_DIST) \
          $(EMFLAGS_INTERFACES) \
          $(EMFLAGS_LIBRARIES) \
          $(BITCODE_FILES) -o $@

dist/wa-sqlite-async.mjs: $(BITCODE_FILES) $(LIBRARY_FILES) $(EXPORTED_FUNCTIONS) $(EXTRA_EXPORTED_RUNTIME_METHODS) $(ASYNCIFY_IMPORTS)
        mkdir -p dist
        EMCC_CLOSURE_ARGS="--externs my_externs.js" $(EMCC) $(EMFLAGS) $(EMFLAGS_DIST) \
          $(EMFLAGS_INTERFACES) \
          $(EMFLAGS_LIBRARIES) \
          $(EMFLAGS_ASYNCIFY_DIST) \
          $(BITCODE_FILES) -o $@

And this tiny side file:

-- my_externs.js
// @externs
var dynCall_v;
@rhashimoto
Copy link
Owner

@rhashimoto rhashimoto commented May 11, 2021

Yes, I'm the one who filed this bug with Emscripten and it's mentioned in the README:

Note that there is a regression in EMSDK 2.0.14 that prevents building.

In the bug I suggest exactly this workaround. 😀

@rhashimoto rhashimoto closed this May 11, 2021
@ricomariani
Copy link
Author

@ricomariani ricomariani commented May 11, 2021

Ha, I didn't notice it was you :D

I had no trouble tweaking the Makefile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants