From 3e3da2e36117503856ab81123bb39e51e56cf6b4 Mon Sep 17 00:00:00 2001 From: Zachary Anderson Date: Thu, 14 Jan 2021 14:29:02 -0800 Subject: [PATCH] Ensure gen_snapshot for the target is built when needed (#23694) --- BUILD.gn | 5 +++++ lib/snapshot/BUILD.gn | 1 + 2 files changed, 6 insertions(+) diff --git a/BUILD.gn b/BUILD.gn index 192675c280..aed14fb910 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -62,6 +62,11 @@ group("flutter") { public_deps += [ "//flutter/flutter_frontend_server:frontend_server", "//third_party/dart:create_sdk", + + # This must be listed explicitly for desktop cross-builds since + # //flutter/lib/snapshot:generate_snapshot_bin will only build + # gen_snapshot for the host and not the target. + "//third_party/dart/runtime/bin:gen_snapshot", ] if (full_dart_sdk) { diff --git a/lib/snapshot/BUILD.gn b/lib/snapshot/BUILD.gn index dc281ea781..fb6d349f2a 100644 --- a/lib/snapshot/BUILD.gn +++ b/lib/snapshot/BUILD.gn @@ -201,6 +201,7 @@ action("create_arm_gen_snapshot") { output_dir = "$root_out_dir/clang_x64" script = "//flutter/sky/tools/create_macos_gen_snapshots.py" visibility = [ ":*" ] + deps = [ "//third_party/dart/runtime/bin:gen_snapshot" ] args = [ "--dst", rebase_path(output_dir), -- GitLab