Skip to content

Commit 0ff6daa

Browse files
mkustermannCommit Queue
authored andcommitted
[dart2wasm] Enable specific binaryen features and not blindly enable all features
We should not blindly use `--all-features` as that will tell binaryen that it may use any features in the resulting wasm file (even features not even finalized yet). The default dart2wasm (without extra opt-in by the user into more wasm features) should only enable wasm features that we require and are available in browsers at the point when they shipped WasmGC. Change-Id: Ifdcc31d938e29048b50be3fd5692693dc80ecbd3 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/436604 Commit-Queue: Martin Kustermann <[email protected]> Reviewed-by: Ömer Ağacan <[email protected]>
1 parent be5dc4f commit 0ff6daa

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pkg/dartdev/lib/src/commands/compile.dart

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,13 @@ class CompileWasmCommand extends CompileSubcommandCommand {
741741
// file for the flags. So please keep the formatting.
742742

743743
final List<String> binaryenFlags = _flagList('''
744-
--all-features
744+
--enable-gc
745+
--enable-reference-types
746+
--enable-multivalue
747+
--enable-exception-handling
748+
--enable-nontrapping-float-to-int
749+
--enable-sign-ext
750+
745751
--closed-world
746752
--traps-never-happen
747753
--type-unfinalizing

0 commit comments

Comments
 (0)