From 8aace64d19fcf6330ceccdc6f4a2a2726064c47a Mon Sep 17 00:00:00 2001 From: Zachary Anderson Date: Mon, 25 Apr 2022 21:09:18 -0700 Subject: [PATCH] Add impeller artifacts to artifacts target (#32912) --- build/archives/BUILD.gn | 91 +++++++++++++++++++++++++---------------- 1 file changed, 55 insertions(+), 36 deletions(-) diff --git a/build/archives/BUILD.gn b/build/archives/BUILD.gn index 2739169b9091e..df806d1068dd3 100644 --- a/build/archives/BUILD.gn +++ b/build/archives/BUILD.gn @@ -1,46 +1,65 @@ +# Copyright 2013 The Flutter Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + import("//flutter/build/zip_bundle.gni") +import("//flutter/common/config.gni") -zip_bundle("artifacts") { - deps = [ - "//flutter/flutter_frontend_server:frontend_server", - "//flutter/lib/snapshot:generate_snapshot_bin", - "//flutter/shell/testing:testing", - ] - prefix = "$full_platform_name/" - if (flutter_runtime_mode != "debug") { - 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" - }, - ] - if (host_os == "win") { - files += [ +if (build_engine_artifacts) { + zip_bundle("artifacts") { + deps = [ + "//flutter/flutter_frontend_server:frontend_server", + "//flutter/impeller/compiler:impellerc", + "//flutter/impeller/tessellator:tessellator_shared", + "//flutter/lib/snapshot:generate_snapshot_bin", + "//flutter/shell/testing:testing", + ] + prefix = "$full_platform_name/" + if (flutter_runtime_mode != "debug") { + 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_out_dir/flutter_tester.exe" - destination = "flutter_tester" + source = "$root_gen_dir/frontend_server.dart.snapshot" + destination = "frontend_server.dart.snapshot" }, ] - } else { + + exe = "" + if (host_os == "win") { + exe = ".exe" + } + dll = ".so" + if (host_os == "win") { + dll = ".dll" + } else if (host_os == "mac") { + dll = ".dylib" + } files += [ { - source = "$root_out_dir/flutter_tester" - destination = "flutter_tester" + source = "$root_out_dir/flutter_tester$exe" + destination = "flutter_tester$exe" + }, + { + source = "$root_out_dir/impellerc$exe" + destination = "impellerc$exe" + }, + { + source = "$root_out_dir/libtessellator$dll" + destination = "libtessellator$dll" }, ] }