summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2022-08-03 12:11:29 -0700
committerGitHub <noreply@github.com>2022-08-03 12:11:29 -0700
commit8dae766e38a3eee17dbf0d686d40905eeb83ce71 (patch)
treeccfee7c41dc66f68c5fa6ed42a2071225977db0c
parent609d378038b196468fed5cb4ae68b67743dfe63f (diff)
downloadbinaryen-8dae766e38a3eee17dbf0d686d40905eeb83ce71.tar.gz
binaryen-8dae766e38a3eee17dbf0d686d40905eeb83ce71.tar.bz2
binaryen-8dae766e38a3eee17dbf0d686d40905eeb83ce71.zip
wasm-emscripten-finalize: Remove __start/__stop_em_js exports (#4870)
We already remove `__start_em_asm` and `__stop_em_asm`. This change is needed since I want to start exporting `__start_em_js` and `__stop_em_js` from emscripten without causing regressions. As a followup I'm planning on moving all of the em_js and em_asm stripping code it PostEmscripten.cpp.
-rw-r--r--src/wasm/wasm-emscripten.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wasm/wasm-emscripten.cpp b/src/wasm/wasm-emscripten.cpp
index 3416c731d..29cf367d4 100644
--- a/src/wasm/wasm-emscripten.cpp
+++ b/src/wasm/wasm-emscripten.cpp
@@ -339,6 +339,9 @@ EmJsWalker findEmJsFuncsAndReturnWalker(Module& wasm) {
wasm.removeExport(exp.name);
}
+ wasm.removeExport("__start_em_js");
+ wasm.removeExport("__stop_em_js");
+
// With newer versions of emscripten/llvm we pack all EM_JS strings into
// single segment.
// We can detect this by checking for segments that contain only JS strings.