You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Get MINIMAL_RUNTIME + MODULARIZE code size back to
where it was before that PR, when emitting HTML: the HTML in that
mode will create a single instance of the app and run it automatically.
It does so without needing the Promise, so we don't need to emit it.
Diffing the output JS to before #10697 shows essentially no difference.
Also move the changelog entry to the right place (we had a release
meanwhile), expand it a little, and ifdef some logging in postamble.js
(if we reject the Promise on an error, we log it out that way anyhow).
Copy file name to clipboardExpand all lines: emcc.py
+13-1Lines changed: 13 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1329,6 +1329,13 @@ def has_c_source(args):
1329
1329
1330
1330
ifshared.Settings.MODULARIZE:
1331
1331
assertnotoptions.proxy_to_worker, '-s MODULARIZE=1 is not compatible with --proxy-to-worker (if you want to run in a worker with -s MODULARIZE=1, you likely want to do the worker side setup manually)'
1332
+
# in MINIMAL_RUNTIME we may not need to emit the Promise code, as the
1333
+
# HTML output creates a singleton instance, and it does so without the
1334
+
# Promise. However, in Pthreads mode the Promise is used for worker
Copy file name to clipboardExpand all lines: src/postamble.js
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -408,15 +408,17 @@ function exit(status, implicit) {
408
408
if(!implicit){
409
409
#if EXIT_RUNTIME==0
410
410
varmsg='program exited (with status: '+status+'), but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)';
411
-
err(msg);
412
411
#if MODULARIZE
413
412
readyPromiseReject(msg);
413
+
#else
414
+
err(msg);
414
415
#endif // MODULARIZE
415
416
#else
416
417
varmsg='program exited (with status: '+status+'), but noExitRuntime is set due to an async operation, so halting execution but not exiting the runtime or preventing further async execution (you can use emscripten_force_exit, if you want to force a true shutdown)';
0 commit comments