diff --git a/engine/src/flutter/frontend_server/lib/server.dart b/engine/src/flutter/frontend_server/lib/server.dart index b0f86e021f..610ae68741 100644 --- a/engine/src/flutter/frontend_server/lib/server.dart +++ b/engine/src/flutter/frontend_server/lib/server.dart @@ -48,6 +48,9 @@ ArgParser _argParser = new ArgParser(allowTrailingOptions: true) help: 'Enable global type flow analysis and related transformations in AOT mode.', defaultsTo: false) + ..addOption('entry-points', + help: 'Path to JSON file with the list of entry points', + allowMultiple: true) ..addFlag('link-platform', help: 'When in batch mode, link platform kernel file into result kernel file.' @@ -206,21 +209,11 @@ class _FrontendCompiler implements CompilerInterface { sdkRoot.resolve(platformKernelDill) ]; } - final bool aot = options['aot']; - final List entryPoints = []; - if (aot) { - for (String entryPointsFile in [ - 'entry_points.json', - 'entry_points_extra.json', - ]) { - entryPoints.add(sdkRoot.resolve(entryPointsFile).toFilePath()); - } - } program = await _runWithPrintRedirection(() => compileToKernel( _mainSource, compilerOptions, - aot: aot, + aot: options['aot'], useGlobalTypeFlowAnalysis: options['tfa'], - entryPoints: entryPoints)); + entryPoints: options['entry-points'])); } runFlutterSpecificKernelTransforms(program); if (program != null) { diff --git a/engine/src/flutter/lib/snapshot/BUILD.gn b/engine/src/flutter/lib/snapshot/BUILD.gn index 8735ef7f98..03b23a58ae 100644 --- a/engine/src/flutter/lib/snapshot/BUILD.gn +++ b/engine/src/flutter/lib/snapshot/BUILD.gn @@ -297,7 +297,7 @@ group("kernel_platform_files") { generate_entry_points_json_with_gen_snapshot("entry_points_json") { input = "$flutter_root/lib/snapshot/snapshot.dart" - output = "$root_out_dir/flutter_patched_sdk/entry_points.json" + output = "$root_out_dir/dart_entry_points/entry_points.json" dart_ui = "$flutter_root/lib/ui/ui.dart" vmservice_io = "//third_party/dart/runtime/bin/vmservice/vmservice_io.dart" dart_vm_entry_points_txt = "$flutter_root/runtime/dart_vm_entry_points.txt" @@ -321,7 +321,7 @@ generate_entry_points_json_with_gen_snapshot("entry_points_json") { } copy_entry_points_extra_json("entry_points_extra_json") { - output = "$root_out_dir/flutter_patched_sdk/entry_points_extra.json" + output = "$root_out_dir/dart_entry_points/entry_points_extra.json" } group("entry_points_json_files") {