Add --strip-names option to wasm-split #412
Merged
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.
The
--strip
option of wasm-split leaves symbol names intact. Specifically, it does not remove the "name" custom section. This may be desired in some cases, but it significantly increases the size of the wasm bundle and potentially leaks source info to users.
This PR adds a
--strip-names
flag to remove the "name" section as well.I considered adding a flag (e.g.
--strip-by [NAME]
) to strip arbitrary custom sections matching NAME (which confusingly, could be "name"), but decided against it. Let me know if that would be preferable.I haven't yet had the chance to verify that our wasm bundle still works with sentry itself after removing the name section, but I'm guessing it will. I won't merge here until that is tested, but I figured it would be good to get reviewed ASAP.