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
exit_with_error('If you specify --proxy-to-worker and specify a "-s ENVIRONMENT=" directive, it must include "worker" as a target! (Try e.g. -s ENVIRONMENT=web,worker)')
exit_with_error('When building with multithreading enabled and a "-s ENVIRONMENT=" directive is specified, it must include "worker" as a target! (Try e.g. -s ENVIRONMENT=web,worker)')
313
313
314
314
@@ -830,6 +830,9 @@ def get_cflags(user_args):
830
830
ifsettings.EMSCRIPTEN_TRACING:
831
831
cflags.append('-D__EMSCRIPTEN_TRACING__=1')
832
832
833
+
ifsettings.SHARED_MEMORY:
834
+
cflags.append('-D__EMSCRIPTEN_SHARED_MEMORY__=1')
835
+
833
836
ifnotsettings.STRICT:
834
837
# The preprocessor define EMSCRIPTEN is deprecated. Don't pass it to code
835
838
# in strict mode. Code should use the define __EMSCRIPTEN__ instead.
// TODO: Due to Closure regression https://github.com/google/closure-compiler/issues/3193, the above line no longer optimizes out down to the following line.
@@ -1252,6 +1253,7 @@ function createWasm() {
1252
1253
// User shell pages can write their own Module.instantiateWasm = function(imports, successCallback) callback
1253
1254
// to manually instantiate the Wasm module themselves. This allows pages to run the instantiation parallel
1254
1255
// to any other async startup actions they are performing.
1256
+
// Also pthreads and wasm workers initialize the wasm instance through this path.
assert(binstanceofSharedArrayBuffer,'requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag');
62
62
#endif
63
63
buffer=b;
@@ -84,10 +84,10 @@ if (!ENVIRONMENT_IS_PTHREAD) {
err('requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag');
0 commit comments