diff --git a/BUILD.gn b/BUILD.gn index f8411f94213..50a09ec8ede 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -162,6 +162,7 @@ group("dart2wasm_platform") { ":runtime_precompiled", "utils/dart2wasm:compile_dart2wasm_js_compatibility_platform", "utils/dart2wasm:compile_dart2wasm_platform", + "utils/dart2wasm:compile_dart2wasm_standalone_platform", "utils/dart2wasm:dart2wasm_snapshot", ] if (defined(is_product)) { diff --git a/pkg/dart2wasm/lib/compile.dart b/pkg/dart2wasm/lib/compile.dart index 948261dd70d..ed6180f3f19 100644 --- a/pkg/dart2wasm/lib/compile.dart +++ b/pkg/dart2wasm/lib/compile.dart @@ -215,6 +215,8 @@ Future compile( final wasm.Mode mode; if (options.translatorOptions.jsCompatibility) { mode = wasm.Mode.jsCompatibility; + } else if (options.translatorOptions.standalone) { + mode = wasm.Mode.standalone; } else { mode = wasm.Mode.regular; } diff --git a/pkg/dart2wasm/lib/dart2wasm.dart b/pkg/dart2wasm/lib/dart2wasm.dart index fda4f0c9adc..319e23dc854 100644 --- a/pkg/dart2wasm/lib/dart2wasm.dart +++ b/pkg/dart2wasm/lib/dart2wasm.dart @@ -43,6 +43,10 @@ final List