diff --git a/DEPS b/DEPS index 3a739b5438888..d75282b86a5dd 100644 --- a/DEPS +++ b/DEPS @@ -31,7 +31,7 @@ vars = { # Dart is: https://github.com/dart-lang/sdk/blob/master/DEPS. # You can use //tools/dart/create_updated_flutter_deps.py to produce # updated revision list of existing dependencies. - 'dart_revision': '2765fcf2aecd3841d082fedaeafc00a73a965f8c', + 'dart_revision': 'e6d7d67f4b35556805dd083fed15bf3ed41f7e33', 'dart_args_tag': '1.4.1', 'dart_async_tag': '2.0.6', diff --git a/lib/snapshot/BUILD.gn b/lib/snapshot/BUILD.gn index bf4e1cf0235d5..76089eb4b449f 100644 --- a/lib/snapshot/BUILD.gn +++ b/lib/snapshot/BUILD.gn @@ -3,6 +3,7 @@ # found in the LICENSE file. import("$flutter_root/lib/ui/dart_ui.gni") +import("//build/compiled_action.gni") import("//third_party/dart/utils/compile_platform.gni") import("//third_party/dart/utils/generate_entry_points_json.gni") @@ -257,6 +258,53 @@ group("kernel_platform_files") { ] } +# Template to generate entry points JSON file using gen_snapshot tool. +# List of entry points is generated as a by-product while doing precompilation. +# +# This template expects the following arguments: +# - input: Name of the input dart script for precompilation. +# - output: Name of the output entry points JSON file. +# - extra_args: Extra arguments to pass to dart_bootstrap (optional). +# - extra_inputs: Extra input dependencies (optional). +# +template("generate_entry_points_json_with_gen_snapshot") { + assert(defined(invoker.input), "Must define input dart script") + assert(defined(invoker.output), "Must define output json file") + extra_args = [] + if (defined(invoker.extra_args)) { + extra_args += invoker.extra_args + } + extra_inputs = [] + if (defined(invoker.extra_inputs)) { + extra_inputs += invoker.extra_inputs + } + compiled_action(target_name) { + # Printing precompiler entry points is folded into precompilation, so gen_snapshot is invoked + # with correct arguments to generate app-aot snapshot. + + input = invoker.input + output = invoker.output + + tool = "//third_party/dart/runtime/bin:gen_snapshot" + inputs = [ + input, + ] + extra_inputs + outputs = [ + output, + ] + args = [ + "--print-precompiler-entry-points=" + rebase_path(output), + "--snapshot-kind=app-aot-blobs", + "--vm_snapshot_data=" + rebase_path("$target_gen_dir/dummy.vm_data.snapshot"), + "--vm_snapshot_instructions=" + rebase_path("$target_gen_dir/dummy.vm_instr.snapshot"), + "--isolate_snapshot_data=" + rebase_path("$target_gen_dir/dummy.isolate_data.snapshot"), + "--isolate_snapshot_instructions=" + rebase_path("$target_gen_dir/dummy.isolate_instr.snapshot"), + ] + extra_args + [ + rebase_path(input), + ] + } +} + generate_entry_points_json_with_gen_snapshot("entry_points_json") { input = "$flutter_root/lib/snapshot/snapshot.dart" output = "$root_out_dir/dart_entry_points/entry_points.json" diff --git a/travis/licenses_golden/licenses_third_party b/travis/licenses_golden/licenses_third_party index b324a79228369..882fbc6dd962f 100644 --- a/travis/licenses_golden/licenses_third_party +++ b/travis/licenses_golden/licenses_third_party @@ -1,4 +1,4 @@ -Signature: f8b0fa85dcfda661056db3508100fa23 +Signature: 77a39e3d3c589aa9c295c23e102794e6 UNUSED LICENSES: