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

Commit e7b447e

Browse files
author
Chris Yang
authored
organize snapshot/BUILD.gn targets and fix create_arm_gen_snapshot (#28345)
1 parent 252d21a commit e7b447e

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

BUILD.gn

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,7 @@ group("flutter") {
7676

7777
# If enbaled, compile the SDK / snapshot.
7878
if (!is_fuchsia) {
79-
public_deps += [
80-
"//flutter/lib/snapshot:generate_snapshot_bin",
81-
"//flutter/lib/snapshot:kernel_platform_files",
82-
]
79+
public_deps += [ "//flutter/lib/snapshot:generate_snapshot_bins" ]
8380

8481
if (_build_engine_artifacts) {
8582
public_deps += [

lib/snapshot/BUILD.gn

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@ import("//flutter/common/config.gni")
88
import("//flutter/lib/ui/dart_ui.gni")
99
import("//third_party/dart/utils/compile_platform.gni")
1010

11+
group("generate_snapshot_bins") {
12+
deps = [
13+
":generate_snapshot_bin",
14+
":kernel_platform_files",
15+
]
16+
if (host_os == "mac" && (target_cpu == "arm" || target_cpu == "arm64")) {
17+
deps += [ ":create_arm_gen_snapshot" ]
18+
}
19+
}
20+
1121
compiled_action("generate_snapshot_bin") {
1222
if (target_cpu == "x86" && host_os == "linux") {
1323
# By default Dart will create a 32-bit gen_snapshot host binary if the target
@@ -221,9 +231,6 @@ source_set("snapshot") {
221231
":vm_snapshot_data_linkable",
222232
":vm_snapshot_instructions_linkable",
223233
]
224-
if (host_os == "mac" && (target_cpu == "arm" || target_cpu == "arm64")) {
225-
deps += [ ":create_arm_gen_snapshot" ]
226-
}
227234

228235
sources = get_target_outputs(":isolate_snapshot_data_linkable") +
229236
get_target_outputs(":isolate_snapshot_instructions_linkable") +

0 commit comments

Comments
 (0)