Hi everyone,

Two changes just landed on the incoming branch today that I want to give
people a heads up about (again, this is on incoming - no changes yet on
master):

1. We upgraded musl from 0.9.13 to 1.0.3. This fixes a variety of libc
bugs. It is the first full upgrade since we started using musl a year ago.
It's a stable release of musl, and our tests look good, so there should not
be any issues, but it is a big change in a system library.

2. --memory-init-file is now on by default, in -O2 and above. This means
that in optimized builds you will get a separate memory init file (.mem)
instead of having it inside the js file. It is still possible to disable
that (--memory-init-file 0) if you prefer, this is just a change in
defaults. The reason for the change is that it is a more sane setting for
an optimized build - it is much smaller and faster to start up with a
separate memory file.

As part of turning on --memory-init-file by default, I added some
assertions on proper use of the runtime. The issue is that the memory init
file is loaded asynchronously, and if you don't wait until it arrives, you
can cause errors. The runtime will now check, when ASSERTIONS=1, if the
runtime is ready (and has not been exited) whenever you call into compiled
C/C++ code. (Note btw that the memory init file is not the only thing that
arrives asynchronously, preloaded files do as well, so these issues are not
new.)

If you see an assertion on calling code before the runtime was ready, you
should wait until the runtime is loaded. The easiest way is to start your
code from main() - either calling it from your main(), or by creating a
main() and having that call your other code to tell it things are ready.

- Alon

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to