[wasm-split] Support --no-placeholders option in multi-split#7789
Merged
aheejin merged 2 commits intoWebAssembly:mainfrom Aug 5, 2025
Merged
[wasm-split] Support --no-placeholders option in multi-split#7789aheejin merged 2 commits intoWebAssembly:mainfrom
aheejin merged 2 commits intoWebAssembly:mainfrom
Conversation
This supports `--no-placeholders` option with `--multi-split`. Currently `--multi-split` does not accept `--no-placeholders` option and set it to true by default internally. Because `--no-placeholders` is false by default and this has been the case for the default two-way split, this means this PR is a breaking change for multi-split users. https://github.com/WebAssembly/binaryen/blob/8ad26cbaca2a3a8982789b25d9a279dc26e85f15/src/tools/wasm-split/split-options.cpp#L210-L218 But it will be inconsistent if we set the option by default to true in case of two-way split and false in case of multi-split. About the test: - This changes `CHECK-A`, `CHECK-B`, and `CHECK-C` to `MOD1`, `MOD2`, and `MOD3` - Because previously `--no-placeholders` was the default, the expectation lines for `PRIMARY` didn't have any placeholders. Now it does. - `***-OPTIONS` check lines now test both options, `--import-namespace` and `--no-placeholders`.
tlively
approved these changes
Aug 5, 2025
Member
|
The breaking change should be fine, since AFAIK this has no production users (yet). |
Member
Author
|
cc @biggs0125 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This supports
--no-placeholdersoption with--multi-split. Currently--multi-splitdoes not accept--no-placeholdersoption and set it to true by default internally.Because
--no-placeholdersis false by default and this has been the case for the default two-way split, this means this PR is a breaking change for multi-split users.binaryen/src/tools/wasm-split/split-options.cpp
Lines 210 to 218 in 8ad26cb
But it will be inconsistent if we set the option by default to true in case of two-way split and false in case of multi-split.
About the test:
CHECK-A,CHECK-B, andCHECK-CtoMOD1,MOD2, andMOD3--no-placeholderswas the default, the expectation lines forPRIMARYdidn't have any placeholders. Now it does.***-OPTIONScheck lines now test both options,--import-namespaceand--no-placeholders.