-
Notifications
You must be signed in to change notification settings - Fork 787
_ #4730
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
There are binaries for the major platforms available here on github. If there are issues with the builds brew or some other package manager provides, perhaps try those? https://github.com/WebAssembly/binaryen/releases I can't think of a flag that changed that would prevent optimization. That sounds very strange. If you can't easily figure this out with those builds, please provide the full |
The only possible theory I could have is if the name section is invalid, binaryen might drop it rather than rewrite it. But you don't have In any case, if you can't figure this out, please provide a full testcase we can reproduce this with: a wasm file + a |
Oh, actually I had another idea: #3306 It fits as it landed in v99. If that's it, it's a bugfix for behavior that was wrong before, so we had no choice but to fix it. But it can regress size. To confirm, try adding Btw, in general, it's safer to let emscripten run wasm-opt for you, as it will supply the right flags automatically, which avoids stuff like this. |
Good, glad we figured this out. Btw, if you're building with wasi-sdk then another flag you might want is |
Smaller Wasm modules are generally better. Especially for the data section, there's no reason to prefer a larger one. An integration test making sure that wasi-sdk + binaryen gets all the expected optimizations would be useful, but this would not be the right repo for it IMO. If there were more of an integration between wasi-sdk and Binaryen, the wasi-sdk repo would make more sense. But AFAIK there's not really an integration to test. The zeroes you're seeing might be .bss, yes, but I thought that the linker skipped emitting .bss sections in most configurations. I don't remember exactly. |
I agree with @tlively that there isn't something to do in this repo. We already have tests for doing the right thing when that flag is passed (unit tests on the But I agree we can improve things in general. Another option might be adding some kind of docs on the |
I would expect users to discover |
Uh oh!
There was an error while loading. Please reload this page.
_
The text was updated successfully, but these errors were encountered: