diff options
author | Sam Clegg <sbc@chromium.org> | 2022-05-31 07:04:51 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-31 07:04:51 -0700 |
commit | 46282a482ec81e8d379b4e9b3ee50f66dd0ac5e5 (patch) | |
tree | 2619fc5ca0b32b60beea064944fe5b5420d8eadc /src/wasm | |
parent | 838de5c4f374396a15d5700ebb51c3e0a89b5840 (diff) | |
download | binaryen-46282a482ec81e8d379b4e9b3ee50f66dd0ac5e5.tar.gz binaryen-46282a482ec81e8d379b4e9b3ee50f66dd0ac5e5.tar.bz2 binaryen-46282a482ec81e8d379b4e9b3ee50f66dd0ac5e5.zip |
Remove renameMainArgcArgv from wasm-emscripten-finalize (#4700)
This part to finalize is currently not used and was added in preparation
for https://reviews.llvm.org/D75277.
However, the better solution to dealing with this alternative name for
main is on the emscripten side. The main reason for this is that
doing the rename here in binaryen would require finalize to always
re-write the binary, which is expensive.
Diffstat (limited to 'src/wasm')
-rw-r--r-- | src/wasm/wasm-emscripten.cpp | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/src/wasm/wasm-emscripten.cpp b/src/wasm/wasm-emscripten.cpp index 4e37464ec..bba638cf2 100644 --- a/src/wasm/wasm-emscripten.cpp +++ b/src/wasm/wasm-emscripten.cpp @@ -525,16 +525,4 @@ void EmscriptenGlueGenerator::separateDataSegments(Output* outfile, wasm.memory.segments.clear(); } -void EmscriptenGlueGenerator::renameMainArgcArgv() { - // If an export call ed __main_argc_argv exists rename it to main - Export* ex = wasm.getExportOrNull("__main_argc_argv"); - if (!ex) { - BYN_TRACE("renameMain: __main_argc_argv not found\n"); - return; - } - ex->name = "main"; - wasm.updateMaps(); - ModuleUtils::renameFunction(wasm, "__main_argc_argv", "main"); -} - } // namespace wasm |