binaryen
binaryen copied to clipboard
New minimal version for binaryen_wasm/js build targets
I'm wondering what if we add more shrieked version for binaryen_wasm/js targets? It seems many passes is not useful for general cases and can be excluded from wasm/js targets, which should improve final sizes (Not sure how much, though).
I guess we could remove from src/passes/CMakeLists.txt
for such new minimal version:
- SafeHeap
- PostEmscripten
- PrintCallGraph
- PrintFeatures
- PrintFunctionMap
- RoundTrip
- Souperify
- SpillPointers
- StackCheck
Also exclude other emscripten-specific stuffs
Does it make sense?
I would consider binaryen_wasm/js the same library as the native build just compiled to a different target, so if someone would want to run any pass present in the native build, I think it should be available in the wasm/js variants as well. Perhaps make it configurable somehow (EXCLUDE_PASSES=...
?), so users can make custom builds with some passes omitted, but I wouldn't omit passes in the general builds.
The point is that some passes may be needed for wasm-opt, which we also build in binaryen.js
Right, and both the CLI and the library have options to run any pass. I think it would be unexpected if some where missing. Say a producer wants to run SafeHeap
or SpillPointers
, because their compiler needs them. Can't tell for sure that a pass is never needed.