-
Notifications
You must be signed in to change notification settings - Fork 699
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
Emscripten travis failure #853
Comments
Reading that error message it does sound familiar. I believe the issue is that your pre and post js files put the output in a function scope. pre/post js files are added before optimization, and changing scope confuses the optimizer, which doesn't recognize the patterns it is looking for (and when optimizing it may do invalid things given the scope change compared to what it expects). Adding a function scope like that doesn't need to be seen by the optimizer, so one solution is to prepend&append that code not using --pre/post js, but just manually, after emcc runs. Another option is to use the MODULARIZE or MODULARIZE_INSTANCE options to put the output in a scope. That should also do the exporting I see you have at the end of the post.js. |
Ah, thanks, I see. The error message makes more sense now. I'll give that a shot! |
It's not correct to use `--pre-js` and `--post-js` to wrap the module in a function instance; instead we're supposed to use `-s MODULARIZE=1`. This still keeps the build as (almost) asm.js, as switching to wasm is a bit more work (we need to preload the wasm binary module). This fixes issue #853.
Not quite sure what's failing here, though maybe I'm doing something weird w/
--pre-js
:See this travis failure for example.
@kripken, any clues?
The text was updated successfully, but these errors were encountered: