Skip to content

Commit

Permalink
Archive windows gen_snapshot.exe. (flutter#35414)
Browse files Browse the repository at this point in the history
* Archive windows gen_snapshot.exe.

This is required to enable engine_v2 recipes for windows platform.

Bug: flutter/flutter#81855

* Add dep to generate gen_snapshot.exe.

* Use target platform name rather than host.

* Use prebuilt_arch.

* Use platform_name instead of is_win.

* Remove android check.

* Fix output name.

* Separate platform and cpu in name.

* Remove failing line.

* Use dart_target_arch rather than target_cpu in windows.

* Add dart_target_arch to scope.

* Add support for android_cpu.

* Fix android_cpu variable name.

* Rebase to ToT

* Try to use target cpu directly.

* Use host os instead of is_win.

* Build engine artifacts for win.

* Update build/archives/BUILD.gn

Co-authored-by: Zachary Anderson <[email protected]>

* Update build/archives/BUILD.gn

Co-authored-by: Zachary Anderson <[email protected]>

* Update build/archives/BUILD.gn

Co-authored-by: Zachary Anderson <[email protected]>

Co-authored-by: Zachary Anderson <[email protected]>
  • Loading branch information
godofredoc and zanderso authored Nov 14, 2022
1 parent 91656a5 commit 965f87d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions build/archives/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -300,3 +300,16 @@ if (is_mac) {
]
}
}

if (host_os == "win") {
zip_bundle("archive_win_gen_snapshot") {
deps = [ "//flutter:gen_snapshot" ]
output = "$full_target_platform_name-$flutter_runtime_mode/windows-x64.zip"
files = [
{
source = "$root_out_dir/gen_snapshot/gen_snapshot.exe"
destination = "gen_snapshot.exe"
},
]
}
}
2 changes: 1 addition & 1 deletion common/config.gni
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,4 @@ if (flutter_prebuilt_dart_sdk) {
# see https://github.com/flutter/flutter/issues/74322
build_engine_artifacts =
current_toolchain == host_toolchain ||
(is_linux && !is_chromeos && current_cpu != "arm") || is_mac
(is_linux && !is_chromeos && current_cpu != "arm") || is_mac || is_win

0 comments on commit 965f87d

Please sign in to comment.