diff options
author | Thomas Lively <tlively@google.com> | 2024-09-16 15:57:33 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-16 15:57:33 -0700 |
commit | 92923108b4bb5da059c0ddd46b254234a9d1c7a5 (patch) | |
tree | 0abc0664379bd702462ccbada448b528a458768a /src/tools/wasm-split/split-options.h | |
parent | 6c07a328e5ce0e1ac187a55d07faf6be642774a5 (diff) | |
download | binaryen-92923108b4bb5da059c0ddd46b254234a9d1c7a5.tar.gz binaryen-92923108b4bb5da059c0ddd46b254234a9d1c7a5.tar.bz2 binaryen-92923108b4bb5da059c0ddd46b254234a9d1c7a5.zip |
[wasm-split] Add a multi-split mode (#6943)
Add a mode that splits a module into arbitrarily many parts based on a
simple manifest file. This is currently implemented by splitting out one
module at a time in a loop, but this could change in the future if
splitting out all the modules at once would improve the quality of the
output.
Diffstat (limited to 'src/tools/wasm-split/split-options.h')
-rw-r--r-- | src/tools/wasm-split/split-options.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tools/wasm-split/split-options.h b/src/tools/wasm-split/split-options.h index b8129f29b..105c90c80 100644 --- a/src/tools/wasm-split/split-options.h +++ b/src/tools/wasm-split/split-options.h @@ -26,6 +26,7 @@ const std::string DEFAULT_PROFILE_EXPORT("__write_profile"); struct WasmSplitOptions : ToolOptions { enum class Mode : unsigned { Split, + MultiSplit, Instrument, MergeProfiles, PrintProfile, @@ -68,6 +69,9 @@ struct WasmSplitOptions : ToolOptions { std::string secondaryMemoryName; std::string exportPrefix; + std::string manifestFile; + std::string outPrefix; + // A hack to ensure the split and instrumented modules have the same table // size when using Emscripten's SPLIT_MODULE mode with dynamic linking. TODO: // Figure out a more elegant solution for that use case and remove this. |