Skip to content

Commit

Permalink
Add gen_snapshot only for non debug versions of artifacts. (flutter#3…
Browse files Browse the repository at this point in the history
  • Loading branch information
godofredoc authored Sep 26, 2022
1 parent 93cb359 commit e9ddd8d
Showing 1 changed file with 52 additions and 27 deletions.
79 changes: 52 additions & 27 deletions build/archives/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,18 @@ generated_file("artifacts_entitlement_config") {
}
}

if (build_engine_artifacts) {
if (build_engine_artifacts && !is_android) {
zip_bundle("artifacts") {
deps = [
"//flutter/flutter_frontend_server:frontend_server",
"//flutter/impeller/compiler:impellerc",
"//flutter/impeller/compiler:impellerc_license",
"//flutter/impeller/tessellator:tessellator_shared",
"//flutter/lib/snapshot:generate_snapshot_bin",
"//flutter/shell/testing:testing",
"//flutter/tools/path_ops:path_ops",
"//flutter/tools/path_ops:path_ops_license",
"//third_party/dart/runtime/bin:gen_snapshot",
]
if (is_mac) {
# TODO(godofredoc): Remove after paths are standardized flutter/flutter#105351.
Expand All @@ -41,51 +45,72 @@ if (build_engine_artifacts) {
prefix = "$full_platform_name-$flutter_runtime_mode/"
}
output = "$prefix/artifacts.zip"
files = [
{
source = "//third_party/icu/flutter/icudtl.dat"
destination = "icudtl.dat"
},
{
source = "$root_out_dir/gen/flutter/lib/snapshot/isolate_snapshot.bin"
destination = "isolate_snapshot.bin"
},
{
source = "$root_gen_dir/flutter/lib/snapshot/vm_isolate_snapshot.bin"
destination = "vm_isolate_snapshot.bin"
},
{
source = "$root_gen_dir/frontend_server.dart.snapshot"
destination = "frontend_server.dart.snapshot"
},
]

dll = ".so"
exe = ""
if (host_os == "win") {
dll = ".dll"
} else if (host_os == "mac") {
dll = ".dylib"
exe = ".exe"
}
files += [

# Only include gen_snapshot for all runtime modes.
files = [
{
source = "$root_out_dir/libtessellator$dll"
destination = "libtessellator$dll"
source = "$root_out_dir/gen_snapshot$exe"
destination = "gen_snapshot$exe"
},
]
if (flutter_runtime_mode == "debug") {
exe = ""
dll = ".so"
lib_prefix = "lib"
if (host_os == "win") {
dll = ".dll"
exe = ".exe"
lib_prefix = ""
} else if (host_os == "mac") {
dll = ".dylib"
}
files += [
{
source = "//third_party/icu/flutter/icudtl.dat"
destination = "icudtl.dat"
},
{
source = "$root_out_dir/flutter_tester$exe"
destination = "flutter_tester$exe"
},
{
source =
"$root_out_dir/gen/flutter/impeller/compiler/LICENSE.impellerc.md"
destination = "LICENSE.impellerc.md"
},
{
source =
"$root_out_dir/gen/flutter/tools/path_ops/LICENSE.path_ops.md"
destination = "LICENSE.path_ops.md"
},
{
source = "$root_out_dir/impellerc$exe"
destination = "impellerc$exe"
},
{
source = "$root_out_dir/${lib_prefix}path_ops$dll"
destination = "${lib_prefix}path_ops$dll"
},
{
source = "$root_out_dir/libtessellator$dll"
destination = "libtessellator$dll"
},
{
source = "$root_gen_dir/flutter/lib/snapshot/isolate_snapshot.bin"
destination = "isolate_snapshot.bin"
},
{
source = "$root_gen_dir/flutter/lib/snapshot/vm_isolate_snapshot.bin"
destination = "vm_isolate_snapshot.bin"
},
{
source = "$root_gen_dir/frontend_server.dart.snapshot"
destination = "frontend_server.dart.snapshot"
},
]
}
if (host_os == "mac") {
Expand Down

0 comments on commit e9ddd8d

Please sign in to comment.