Skip to content

Commit 3b02e41

Browse files
mkustermannCommit Queue
authored and
Commit Queue
committed
[dart2wasm] Make dart compile wasm accept --enable-experiment flags and pass those to compiler
This is a preparation for making CI bot to run using `dart compile wasm` instead of `pkg/dart2wasm/tool/compile_benchmark`. Change-Id: I804d9392a8993cddc7a01afdd345ba9ee9a83374 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/366820 Commit-Queue: Martin Kustermann <[email protected]> Reviewed-by: Ömer Ağacan <[email protected]>
1 parent c03aa10 commit 3b02e41

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,8 @@ class CompileWasmCommand extends CompileSubcommandCommand {
686686
help: defineOption.help,
687687
abbr: defineOption.abbr,
688688
valueHelp: defineOption.valueHelp,
689-
);
689+
)
690+
..addExperimentalFlags(verbose: verbose);
690691
}
691692

692693
@override
@@ -771,6 +772,7 @@ class CompileWasmCommand extends CompileSubcommandCommand {
771772
handleOverride(optimizationFlags, 'minify',
772773
args.wasParsed('minify') ? null : args.flag('minify'));
773774

775+
final enabledExperiments = args.enabledExperiments;
774776
final dart2wasmCommand = [
775777
sdk.dartAotRuntime,
776778
sdk.dart2wasmSnapshot,
@@ -786,6 +788,7 @@ class CompileWasmCommand extends CompileSubcommandCommand {
786788
'--import-shared-memory',
787789
'--shared-memory-max-pages=$maxPages',
788790
],
791+
...enabledExperiments.map((e) => '--enable-experiment=$e'),
789792

790793
// First we pass flags based on the optimization level.
791794
...optimizationFlags,

0 commit comments

Comments
 (0)