From 028f47368fe844130f52ad7811c8028ebd18a38e Mon Sep 17 00:00:00 2001 From: Thomas Lively <7121787+tlively@users.noreply.github.com> Date: Tue, 1 Jun 2021 12:15:24 -0400 Subject: [wasm-split] Minimize names of newly created exports (#3905) wasm-split would previously use internal function names to create the external names of the functions that are newly exported from the primary module to be imported into the secondary module. When the input module contains full function names (as is commonly the case when emitting symbol maps), this caused the function names to be preserved as the export names, even when names are otherwise being stripped. To save on code size and properly anonymize functions, generate minimal export names when debuginfo is disabled instead. --- src/tools/wasm-split.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/tools/wasm-split.cpp') diff --git a/src/tools/wasm-split.cpp b/src/tools/wasm-split.cpp index 3ac8b2c45..7f3fe65c4 100644 --- a/src/tools/wasm-split.cpp +++ b/src/tools/wasm-split.cpp @@ -676,6 +676,7 @@ void splitModule(Module& wasm, const WasmSplitOptions& options) { if (options.exportPrefix.size()) { config.newExportPrefix = options.exportPrefix; } + config.minimizeNewExportNames = !options.passOptions.debugInfo; std::unique_ptr secondary = ModuleSplitting::splitFunctions(wasm, config); -- cgit v1.2.3