organize snapshot/BUILD.gn targets and fix create_arm_gen_snapshot (flutter/engine#28345)

This commit is contained in:
Chris Yang
2021-08-27 16:31:01 -07:00
committed by GitHub
parent 3def63e845
commit d8663f8a38
2 changed files with 11 additions and 7 deletions

View File

@@ -76,10 +76,7 @@ group("flutter") {
# If enbaled, compile the SDK / snapshot.
if (!is_fuchsia) {
public_deps += [
"//flutter/lib/snapshot:generate_snapshot_bin",
"//flutter/lib/snapshot:kernel_platform_files",
]
public_deps += [ "//flutter/lib/snapshot:generate_snapshot_bins" ]
if (_build_engine_artifacts) {
public_deps += [

View File

@@ -8,6 +8,16 @@ import("//flutter/common/config.gni")
import("//flutter/lib/ui/dart_ui.gni")
import("//third_party/dart/utils/compile_platform.gni")
group("generate_snapshot_bins") {
deps = [
":generate_snapshot_bin",
":kernel_platform_files",
]
if (host_os == "mac" && (target_cpu == "arm" || target_cpu == "arm64")) {
deps += [ ":create_arm_gen_snapshot" ]
}
}
compiled_action("generate_snapshot_bin") {
if (target_cpu == "x86" && host_os == "linux") {
# By default Dart will create a 32-bit gen_snapshot host binary if the target
@@ -221,9 +231,6 @@ source_set("snapshot") {
":vm_snapshot_data_linkable",
":vm_snapshot_instructions_linkable",
]
if (host_os == "mac" && (target_cpu == "arm" || target_cpu == "arm64")) {
deps += [ ":create_arm_gen_snapshot" ]
}
sources = get_target_outputs(":isolate_snapshot_data_linkable") +
get_target_outputs(":isolate_snapshot_instructions_linkable") +