Revert "Changes a few compile options for the new emscripten (3.1.70)" (#917)
Reverts flutter/buildroot#916
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 61e54bb..608e36a 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -292,8 +292,6 @@
"NO_EXIT_RUNTIME=1",
"-s",
"STRICT=1",
- "-s",
- "ENVIRONMENT=web,worker",
# Reduces global namespace pollution.
"-s",
diff --git a/build/toolchain/wasm.gni b/build/toolchain/wasm.gni
index 7994057..1e4b953 100644
--- a/build/toolchain/wasm.gni
+++ b/build/toolchain/wasm.gni
@@ -62,6 +62,11 @@
"{{root_out_dir}}/{{target_output_name}}.js.symbols",
]
+ if (wasm_use_pthreads || (defined(extra_toolchain_args.wasm_use_pthreads) &&
+ extra_toolchain_args.wasm_use_pthreads)) {
+ link_outputs += [ "{{root_out_dir}}/{{target_output_name}}.worker.js" ]
+ }
+
if (is_debug && !wasm_use_dwarf) {
link_outputs += [ "{{root_out_dir}}/{{target_output_name}}.wasm.map" ]
}