Skip to content

Commit

Permalink
organize snapshot/BUILD.gn targets and fix create_arm_gen_snapshot (f…
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Yang authored Aug 27, 2021
1 parent 252d21a commit e7b447e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
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

0 comments on commit e7b447e

Please sign in to comment.