diff --git a/lib/snapshot/BUILD.gn b/lib/snapshot/BUILD.gn index 618640efe53be..ee98f51d68708 100644 --- a/lib/snapshot/BUILD.gn +++ b/lib/snapshot/BUILD.gn @@ -4,6 +4,7 @@ import("//build/compiled_action.gni") import("//build/fuchsia/sdk.gni") +import("//flutter/build/zip_bundle.gni") import("//flutter/common/config.gni") import("//flutter/lib/ui/dart_ui.gni") import("//flutter/sky/tools/macos_snapshots.gni") @@ -290,3 +291,16 @@ compile_platform("strong_platform") { group("kernel_platform_files") { public_deps = [ ":strong_platform" ] } + +if (is_win) { + zip_bundle("archive_win_gen_snapshot") { + deps = [ "//third_party/dart/runtime/bin:gen_snapshot" ] + output = "$target_platform_name-$target_cpu-$flutter_runtime_mode/windows-x64.zip" + files = [ + { + source = "$root_out_dir/gen_snapshot.exe" + destination = "gen_snapshot.exe" + }, + ] + } +} diff --git a/tools/gn b/tools/gn index 7b218ff116802..2a5ae5766cadb 100755 --- a/tools/gn +++ b/tools/gn @@ -288,12 +288,6 @@ def to_gn_args(args): gn_args['target_cpu'] = get_target_cpu(args) gn_args['dart_target_arch'] = gn_args['target_cpu'] - # No cross-compilation on Windows (for now). Use host toolchain that - # matches the bit-width of the target architecture. - if sys.platform.startswith(('cygwin', 'win')) and args.target_os != 'win': - gn_args['host_cpu'] = cpu_for_target_arch(gn_args['target_cpu']) - gn_args['target_cpu'] = cpu_for_target_arch(gn_args['target_cpu']) - # macOS host builds (whether x64 or arm64) must currently be built under # Rosetta on Apple Silicon Macs. # TODO(cbracken): https://github.com/flutter/flutter/issues/103386