-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[CP] [dart2wasm] Pass source maps to wasm-opt when optimizing #56423
Comments
LGTM @itsjustkevin any chance we could get this approved & landed to be included in time for upcoming dot release? |
Flutter is seeing a regression with 1b1740e Flutter's tooling is passing the
|
The issue above should be fixed with 075c443. I've added that commit to my cherry-pick CL: https://dart-review.googlesource.com/c/sdk/+/379782. |
@osa1 approved, please merge |
To be able to know when we are generating a source map, make `dart compile wasm` aware of the `--no-source-maps` flag. The "name" segments of source mappings are also made `null` with this patch. Browsers don't use that segment and binaryen doesn't support it. Change-Id: I7b52c8fb7cef92ed60547e97ad137e0cd3967f26 Cherry-pick: https://dart-review.googlesource.com/c/sdk/+/378421 Cherry-pick: https://dart-review.googlesource.com/c/sdk/+/380000 Cherry-pick-request: #56423 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/379782 Reviewed-by: Martin Kustermann <[email protected]>
The CL was merged. |
Commit(s) to merge
1b1740e
075c443
Target
stable
Prepared changelist for beta/stable
https://dart-review.googlesource.com/c/sdk/+/379782
Issue Description
dart2wasm currently does not pass the generated source map to wasm-opt when optimizing with wasm-opt.
As a result the source map becomes invalid when the optimizations are enabled (i.e. always when
-O0
is not used).What is the fix
With this commit we pass the source map file to wasm-opt, which then updates it as it transforms the code.
Why cherry-pick
Source map support in dart2wasm was cherry-picked to stable in #56239, but they are useless when optimizations are enabled.
Risk
Assuming good test coverage of wasm-opt, I don't expect this change to break anything.
Issue link(s)
We don't have a GitHub issue for this issue.
Extra Info
No response
The text was updated successfully, but these errors were encountered: