diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2021-06-01 12:15:24 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-01 09:15:24 -0700 |
commit | 028f47368fe844130f52ad7811c8028ebd18a38e (patch) | |
tree | 7c6b2a68a55f922d70f534abd594d900079139b3 /src/tools/wasm-split.cpp | |
parent | 88606f75b97ef3014edb74484125534c2040095b (diff) | |
download | binaryen-028f47368fe844130f52ad7811c8028ebd18a38e.tar.gz binaryen-028f47368fe844130f52ad7811c8028ebd18a38e.tar.bz2 binaryen-028f47368fe844130f52ad7811c8028ebd18a38e.zip |
[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.
Diffstat (limited to 'src/tools/wasm-split.cpp')
-rw-r--r-- | src/tools/wasm-split.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
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<Module> secondary = ModuleSplitting::splitFunctions(wasm, config); |