Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

organize snapshot/BUILD.gn targets and fix create_arm_gen_snapshot #28345

Merged
merged 6 commits into from
Aug 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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 += [
Expand Down
13 changes: 10 additions & 3 deletions lib/snapshot/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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") +
Expand Down